Invalid Column Name? (1 Viewer)

deagio

Registered User.
Local time
Today, 04:09
Joined
Dec 28, 2004
Messages
17
Hi,

I'm trying to make a button to link my form to a report, but I keep getting the error 'Invalid Column Name: FieldContents'.

I cant see why this error would be occuring, the field exists in both the report and the form.

Here is the code I used to link the two, I am using the datase with SQL, i don't know if this could be causing it.

Private Sub Command47_Click()
Dim stDocName As String

On Error GoTo Err_Command47_Click

DoCmd.RunCommand acCmdSaveRecord
stDocName = "repInv"
DoCmd.OpenReport stDocName, acViewPreview, , "[Delivery_SigRef] = " & Me.Delivery_SigRef

Exit_Command47_Click:
Exit Sub

Err_Command47_Click:
MsgBox Err.Description
Resume Exit_Command47_Click

End Sub


Thanks,


James
 

jgc31

Registered User.
Local time
Today, 04:09
Joined
Dec 4, 2004
Messages
78
james

I dont believe that you have your SQL grammer quite right try either

"[Delivery_SigRef] = " & " ' " & Me!Delivery_SigRef & " ' "
or
"[Delivery_SigRef] = " & """ & Me!Delivery_SigRef & """"
 

Users who are viewing this thread

Top Bottom