#Type! Error in Textbox when form control source returns 0 records

Best Microsoft Access Programmer Portland OR

Having issues getting form textbox to calc. I’ve created a form with a control source query. The form has text boxes that are bound to the query fields. I then created another form, and used the prior as a sub form. I then added textbox objects to the parent form and added the subform totals, using NZ() to return zero if null. That does not seem to work, as the textbox remains blank. I also tried to create a recordset in VBA and DCOUNT the records in the query (if =0 then set textbox objects to zero). That returns zero, but can’t seem to get it to return anything but zero. (If DCount(“*”, “qry_PlExpensePaysFormInput_fromUni”) = 0 Then…). How can I get these textboxes to show zero so I don’t get a #Type! error? The third snapshot shows how it works when records are returned in the underlying query.


I posted screenshots at the following: https://www.accessforums.net/showthread.php?t=79396&p=446644#post446644

submitted by /u/XxMercerxX
[link] [comments]

Microsoft Acess Developer Portland OR