Run Time error 3075

hortizjr59

Registered User.
Local time
Today, 00:05
Joined
Sep 6, 2011
Messages
30
Hello All.

I am running Access 2007 using the following code I pickup from this forum, it works fine in the sample databse however when I use it in my database and make the required changes I keep getting the following error:
"Run-Time error 3075:
Syntax error (missing operator) in query expression 'count(Product Document NO)

The code I am ussing is:

Private Sub Combo105_DblClick(Cancel As Integer)
Dim lngcombo105 As Long
Dim strOpenArgs As String
If DCount("Product Document NO", "Documents", "Product Document NO = '" & Me.Combo105.Text & "'") = 0 Then strOpenArgs = Me.Combo105.Text
If IsNull(Me.Combo105) Then
Me.Combo105.Text = ""
Else
lngcombo105 = Me![Combo105]
Me.Combo105 = Null
End If
DoCmd.OpenForm "FRM_Docs", , , , , acDialog, "New#" & strOpenArgs
Me.Combo105.Requery
If lngcombo105 <> 0 Then
Me.Combo105 = lngcombo105
ElseIf lngInfoXchg <> 0 Then
Me.Combo105 = lngInfoXchg
End If
End Sub


Thanks for any help.


Hector
 
Because of the inadvisable spaces, your field name will usually need to be bracketed:

[Product Document NO]
 
Thank You:

That worked

Awsome!!!!!!!!!!

:)
 
Happy to help. Obviously, I'd recommend getting rid of any spaces or symbols in your names, if it's not too late.
 
Took your suggestion and made the changes.

Thanks:

Forms Questions:

Created 2 new forms in my database and for some odd reason even though I set my tab order I cannot get the form to open on what I designated to be my 1st tab stop. Once I hit my tab it goes to the 1st tab stop then cycles through my tab order corrected.

Can't figure out how to get the form to open in number 1 tab position.

Thanks.

:confused:
 
I've had that happen when it seemed to want to go to a different section than I wanted it to. You might try using SetFocus in the load event of the form to force it to the control you want it in.
 

Users who are viewing this thread

Back
Top Bottom