Help with search box (1 Viewer)

andywhittle

New member
Local time
Yesterday, 23:04
Joined
Sep 29, 2006
Messages
9
Hi,

Wondered if anyone could help me??

Am looking to use the Invoice Number Search from the Main Menu Form in the attached database? So that if a user searches for an invoice number and it is not in the table. The user gets a txt box stating that the Invoice Number "Is not Found!" and is returned to the main menu form

Thanks in advance

Andy
 

Attachments

  • Copy of H0514.zip
    21.8 KB · Views: 97

rborob

Registered User.
Local time
Yesterday, 23:04
Joined
Jun 6, 2006
Messages
116
try using an input box instead. on the click event open the input box as parameter entry then open a recordest based on those criteria. Then check to see whether the recordset is empty. oif it is the invoiceID doesnt exist.

Dim tempInteger As integer
Dim rst As recordset
Dim str As string

tempInteger = InputBox("Please Enter A InvoiceID") etc etc

str = "Sql statement returning data where invoice id = tempinteger"
Set rst = MyDb.openrecordset(str)

If rst.eof=True Then
MsgBox("No invoice")
Else
'Do whetever
End if
 

andywhittle

New member
Local time
Yesterday, 23:04
Joined
Sep 29, 2006
Messages
9
I'll give it a go but i'm a bit of novice to say the least.

Thanks for your help!
 

andywhittle

New member
Local time
Yesterday, 23:04
Joined
Sep 29, 2006
Messages
9
Hi

I've had a go but am still struggling. Would some body mind filling in the code on the attached database for me. So I could have a look at it and see how it works???
 

Users who are viewing this thread

Top Bottom