Hi Everyone,
I try lots of method to create a search box but i won't works.
Anyone can help me?
Thanks
Hi Everyone,
I try lots of method to create a search box but i won't works.
Anyone can help me?
Thanks
It*
I search for Part number but there is a error on it. But i can't find where is the problem.
Private Sub txtpartnumber_AfterUpdate()
Dim strpn as String
Dim strname as String
Dim strname = Me.txtpartnumber.Value
strpn = "SELECT" from (tblnike) "*"" (P/N ""*" txtpartnumber "*''")
Me.RecordSource = strname
End Sub
What do you want strpn to say?
Select * from [tblnike] where [p/n] like * & txtpartnumber & *
??
Sent from my iPhone using Tapatalk
Hi Andy49,
I want the strpn to search for part number of the shoe. But the program can't works.
Any ideas where goes wrong?
Thanks & Regards
Jeremy Sng
I'm assuming your getting an error ? If so which line of vba code? I'd say initially use "select * from tblnike where [p/n] =1234" (assuming txtpartnumber is integer)
By using a code you know you can check whether the program does as it should.
Then alter the string to include txtpartnumber.
Sent from my iPhone using Tapatalk
hi andy,
Can i check with you, is integer can replace by string. as my p/n is 1234-5678 (this p/n is consider string)?
So i need to Dim strpn as String?
eg my table as.
nike new shoe p/n: 1234-5678
puma new shoe p/n: 8765-4321
And i able to search just the p/n all new show will out. But the program still won't works.
Thanks and Regards
Jeremy Sng
Strpn is a string the way you have it set up
dim strpn as string
strpn = "SELECT * from [tblnike] where [P/N] = " & chr(34) & txtpartnumber & chr(34)
Hi Andy,
What does it mean by chr(34)?
It's an extra "
Sent from my iPhone using Tapatalk