Error message (1 Viewer)

Mulli

New member
Local time
Today, 06:42
Joined
May 14, 2009
Messages
4
I have added a command button to a form that will open another form with information relating to the same refence number. It works however it brings up the error message 'Microsoft Office Access can't find the field 'ToggleLink' referred to in your expression' when it opens the other form.

Many thanks to anyone who can help me here

I can't find the problem here can anyone else see it as I don't use Visual Basic, I use Access to create procedures


Private Sub Combo18_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Camera Partnership Ref No] = '" & Me![Combo18] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Private Sub Command20_Click()
On Error GoTo Err_Command20_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Enforcement Hours to Date"

stLinkCriteria = "[Camera Partnership Ref No]=" & "'" & Me![Combo18] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command20_Click:
Exit Sub
Err_Command20_Click:
MsgBox Err.Description
Resume Exit_Command20_Click

End Sub
 
Last edited:

ezfriend

Registered User.
Local time
Yesterday, 22:42
Joined
Nov 24, 2006
Messages
242
The error could be in your "Enforcement Hours to Date" form.
 

Users who are viewing this thread

Top Bottom