I have a procedure where I am using a couple of DCount statements to validate data and automate the data entry. The first one works correctly and if everthing is true it fills in a textbox with my LogOn and puts the date in another textbox, if all is not true I get a message. This is what is working:
If DCount("[LogOn]", "tblAuthorizedUsers", "[LogOn]='" & fOSUserName & "' And [ApdCCD] = True"
= 0 Then
I have a similar second line that is not working, but it is giving me an error message, no debugger, "Access can't find 'txtField1' in the procedure." Now that is fine, except that txtField1 appears in only one line of code in the entire dbase, and that line is in a procedure in another form and the two procedure have not one thing incommon. This is the second line:
If DCount("[LogOn]", "tblAuthorizedUsers", "[LogOn]='" & fOSUserName & "' And [ApdAsy] = True And [EMailAddress] = '" & [EMailAddress] & "'"
= 1 Then
This is just getting e-mail addresses. Can anyone point out to me what is wrong with the second line of code? I have been looking at this for about 3/4 of a day now, and I must be blind, but I can not see anything wrong. Thank you in advance to anyone rendering some assistnace.
If DCount("[LogOn]", "tblAuthorizedUsers", "[LogOn]='" & fOSUserName & "' And [ApdCCD] = True"
I have a similar second line that is not working, but it is giving me an error message, no debugger, "Access can't find 'txtField1' in the procedure." Now that is fine, except that txtField1 appears in only one line of code in the entire dbase, and that line is in a procedure in another form and the two procedure have not one thing incommon. This is the second line:
If DCount("[LogOn]", "tblAuthorizedUsers", "[LogOn]='" & fOSUserName & "' And [ApdAsy] = True And [EMailAddress] = '" & [EMailAddress] & "'"
This is just getting e-mail addresses. Can anyone point out to me what is wrong with the second line of code? I have been looking at this for about 3/4 of a day now, and I must be blind, but I can not see anything wrong. Thank you in advance to anyone rendering some assistnace.