By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,476 Members | 1,529 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,476 IT Pros & Developers. It's quick & easy.

Can't Search data from table

100+
P: 101
Hi,
My project is in MS Access.
In that I have one Form(Search) which I am using for Search data in my Table(PRODUCTION).
Now in this form I have one Combobox(PalletNo) and one button(Search)
When I select an item from combobox and click on Search button then it will generate report based on search criteria.
In my combobox items are like
PFI
LPL
LPL/AVON
LPL/EL
LPL/PFI
VIC
ZERTH
etc
Now when I select anything except LPP/PFI
then it will shoe me result whatever I nedd.
But when I select LPL/PFI then it will show me error that Data Tyoe Mismatch in Criteria Expression.
Only for perticular item it shows me Error.
Even I check Table also but there is no such problem in it also.
I think there is /P in LPL/PFI so may be because of that it will show error.Or is there any other problem?
I am using this code on click event of Search Button

Private Sub Search1_Click()
On Error GoTo Err_Search1_Click

Dim stDocName As String

stDocName = "PRODUCTION1"
DoCmd.OpenReport stDocName, acViewPreview, , "PRODUCTION.CustomerCode = '" & Me!CustomerCode_Combo1 & "'"

Exit_Search1_Click:
Exit Sub

Err_Search1_Click:
MsgBox Err.Description
Resume Exit_Search1_Click

End Sub

Plz Help Me.
Thanks.
Dec 18 '07 #1
Share this Question
Share on Google+
1 Reply


100+
P: 101
I got the answer so no reply plz.
Dec 19 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.