i keep receiving a "No Current Record" error. I know WHY i am getting this,
it is because the SQL statement returns nothing.
i want to account for this event. i want the text field on the form to
display zero. this seems like it should not be this hard
here is the code:
For i = 0 to 10
LocationID = MyArray(i,0)
sqlCode = "a sql statement"
Set WRC_RS = mydb.OpenRecordset(sqlCode)
WRC_RS.MoveFirst
If IsNull(WRC_RS) = True Then
Me.Form("wrc_" & LocationID) = 0
Me.Form("wrc_amount_" & LocationID) = 0
Else
Me.Form("wrc_" & LocationID) = WRC_RS("Orders")
Me.Form("wrc_amount_" & LocationID) = WRC_RS("TotalAmount")
End If
Next i
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.