Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Missing operator in query expression 1

Status
Not open for further replies.

acnovice

Programmer
Jan 27, 2005
100
US
Hi,

I have "Run-time error '3075':"
Syntax error (missing operator) in query expression '[TPbaseNo]=P4230P-1F'.

I have a 'Product Info'(main form) with 'frmProductInfo' (sub form).

Following code is in my subform 'On Dbl Click' event.

Private Sub Form_DblClick(Cancel As Integer)
Dim DocName As String
Dim stWhere As String

DocName = "frmProdTechSpec"
stWhere = "[TPbaseNo]= " & [Forms]![Product Info]![frmProductInfo]![TPbaseNo]
DoCmd.OpenForm DocName, acNormal, , stWhere
End Sub

When I double click on the sub form TPbaseNo, it browse "frmProdTechSpec" form to show detail info.

TPbaseNo is text type. (ex. P2306ED 48V, R4300P-48 FH...)

Any response will be appreciated.
 
stWhere = "[TPbaseNo]=[tt]'"[/tt] & [Forms]![Product Info]![frmProductInfo].Form![TPbaseNo] & [tt]"'"[/tt]


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hi PHV,

It's on Friday morning and you made me happy today with one line of code.
Thank you and you have a great weekend.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top