RE:Linking Forms

faceman

Registered User.
Local time
Today, 19:36
Joined
Feb 11, 2003
Messages
20
RE:Linking Forms

Hayley,
I have tried using your code on my form, but I get an error that says: "Syntax error(missing operator) in query expression '[txtLineID] = 3PW4000ExMH0+00A-13+00' ".


What does this error mean?

(That long string is a concatenated field I am using as my PK)


Any help would be appreciated. The code I put in is as follows:


Private Sub cmdLaterals_Click()

On Error GoTo Err_cmdLaterals_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmLaterals"
stLinkCriteria = "[txtLineID] =" & Me![MHLineID]
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_cmdLaterals_Click:
Exit Sub

Err_cmdLaterals_Click:
MsgBox err.Description
Resume Exit_cmdLaterals_Click

End Sub
 
Here is a sample that I have cut down from a database that I use this on. You could really keepi it all on the one form however I had no choice because the form I was using was really busy and didn't have space for anything else thus the reason why I done this.

Remenmber to save the record and don't use me.form.refresh as I did.

Edit: Cannot add it here it's still too big cut down

Hayley.Baxter@bskyb.com if you want it drop me an email

HTH
Hay
 
Sample sent to your email add, let me know if you don't get it.

PS Managed to reduce the size to fit on here after all that:rolleyes: Didn't realise I still had some reports in there!
 

Users who are viewing this thread

Back
Top Bottom