ERROR MESSAGE

  • Thread starter Chetan I. Rathi
  • Start date
C

Chetan I. Rathi

Hi,

First let me give you back ground. I have form with some information and
another form with detail information. So I inserted a command to main from to
open detail for the corresponding item. I hope this explanation will good to
put forth my error message.

When I click on that command on main form it gives me an error message
“Microsoft office cannot find the field Togglelink referred to your
expressionâ€. However, when click OK; it still takes me to desired form.
Similarly, when I close that form it gives me same error.

Does any one know what wrong I am doing?

Thanking in advance
Rathi
 
C

Chetan I. Rathi

Hi wayne,
thanks for your prompt reply. But how do I know the code? I mean I did
everything, mentioned earlier, via command box wizard.

So if at all I want to find out code than how can I find this?

Thanks
Rathi
 
C

Chetan I. Rathi

Sorry, I think this what you were asking for,

Private Sub Command61_Click()
On Error GoTo Err_Command61_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Capabilites of linked form"
stLinkCriteria = "[Equipment Name]=" & "'" & Me![Equipment Name] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command61_Click:
Exit Sub
Err_Command61_Click:
MsgBox Err.Description
Resume Exit_Command61_Click
End Sub


Rathi
 
W

Wayne-I-M

Hi

Change the code to this (cut and paste)



Private Sub Command61_Click()
On Error GoTo Err_Command61_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Capabilites of linked form"
stLinkCriteria = "[Equipment Name]=" & Me![Equipment Name]
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command61_Click:
Exit Sub

Err_Command61_Click:
MsgBox Err.Description
Resume Exit_Command61_Click
End Sub





--
Wayne
Manchester, England.



Chetan I. Rathi said:
Sorry, I think this what you were asking for,

Private Sub Command61_Click()
On Error GoTo Err_Command61_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Capabilites of linked form"
stLinkCriteria = "[Equipment Name]=" & "'" & Me![Equipment Name] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command61_Click:
Exit Sub
Err_Command61_Click:
MsgBox Err.Description
Resume Exit_Command61_Click
End Sub


Rathi

Wayne-I-M said:
Hi

What is the code behind your button
 

Ask a Question

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.

Ask a Question

Top