theunknownknight
MIS
With rs
I am trying to compare a field in a recordset with info in a textbox from a form based on the same table.
I.e. Both the recordset and the form are based on a table called remittance. The error I recieve is "Object variable or with block variable not set". Note: Dumb- is a variable of type Form_Remittance. rs - is the recordset based off of Remittance
Here is the code snippet where I am recieving the problem:
Do While Not .EOF
''''''''''''Get error on line below on both Dumb.---.--- statements'''''''''''''''''''''''''''''''''''''''''''''''
If rs!Remitter = Dumb.Remitter.Text Then
If rs!checknum = Dumb.Che.Text Then
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Answer = MsgBox("You may have entered a duplicate check. Do you want to ensure that no duplicate checks are entered into the database?", vbYesNo, "Possible Duplicate Check"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Else
rs.MoveNext
End If
Else
rs.MoveNext
End If
Loop
What is my problem and how do I refer to a a specific Form's textbox in a code module?
Thanks in Advance.
Jason
I am trying to compare a field in a recordset with info in a textbox from a form based on the same table.
I.e. Both the recordset and the form are based on a table called remittance. The error I recieve is "Object variable or with block variable not set". Note: Dumb- is a variable of type Form_Remittance. rs - is the recordset based off of Remittance
Here is the code snippet where I am recieving the problem:
Do While Not .EOF
''''''''''''Get error on line below on both Dumb.---.--- statements'''''''''''''''''''''''''''''''''''''''''''''''
If rs!Remitter = Dumb.Remitter.Text Then
If rs!checknum = Dumb.Che.Text Then
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Answer = MsgBox("You may have entered a duplicate check. Do you want to ensure that no duplicate checks are entered into the database?", vbYesNo, "Possible Duplicate Check"
Else
rs.MoveNext
End If
Else
rs.MoveNext
End If
Loop
What is my problem and how do I refer to a a specific Form's textbox in a code module?
Thanks in Advance.
Jason