Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FRUSTRATED Can't ID Object - Error Code

Status
Not open for further replies.

SGTSweety

Programmer
Oct 25, 2003
24
US
Having trouble getting text box using short-date format to be identified in VB as an object. Command button uses following code to determine if date field [frmItxt_GISDone] is null. Changed name [Date_Entered] in master table and successive queries and forms as VB Editor's 'List Properties/Methods' drop-down menu forced name to be [tblMapping.Date_Entered]. Attempted several iterations of naming, code approach without success. Sure could use some help on this. Been working on it all day.

Private Sub frmIcmd_AddAddr_Click()
On Error GoTo Err_frmIcmd_AddAddr_Click

If Me!["frmItxt_GISDone"].Value Is Null Then

DisplayMsg = MsgBox("All fields must be complete before entering cross-reference addresses.", vbCritical, "DATA ENTRY PROCEDURAL ERROR.")
DoCmd.Close
GoTo Skip2
Else
Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmAddADDR"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If

Exit_frmIcmd_AddAddr_Click:
Exit Sub

Err_frmIcmd_AddAddr_Click:
MsgBox Err.DESCRIPTION
Resume Exit_frmIcmd_AddAddr_Click

Skip2:

End Sub


Thanks in advance.

Steven
"Better to be part of the solution than part of the problem."
 
Have you tried this ?
If IsNull(Me![frmItxt_GISDone]) Then

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Or this ?
If IsNull(Me![Date_Entered]) Then

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Are you sure this is correct?

If Me!["frmItxt_GISDone"].Value Is Null Then

Using the Me! syntax identifies the term following as an object on the form but enclosing it in quote marks identifies it as a literal term. And does the frmItxt stand for the form name or a control on the form?

If the latter then Me!frmItex_GISDone should be adequate to identify the object on the form. Brackets are only need when the object name has a space in it, e.g. Me![My Control]

And do you really need .Value? Just use the IsNull function:

If IsNull(Me!frmItxt_GISDone) then
 
PHV,AvGuy:

Thanks so much. Input your suggestions this morning and everything worked.

Best regards,
Steven

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top