Hi everyone..can you help me with this problem?

in my frm1, i have:
ID no: (txtid)
Name: (txtname)
Address: (txtaddress)

in my frm2, i have:
ID_no: (txtid)
ISBN: (txtisbn)
Date Borrowed: (txtdate)

the problem now is I don't know how to code it, when i input the ID_No in frm2 then i'll save it.. a msgbox will appear if the ID_no is not yet registered, so there is a connection between the txtid in frm1 and the txtid in frm2.. but if it's registered i will just save automatically..

please help me!

please pass more information what exactly you are trying to do.

here is the flow of my system...

as you can see in my frm1 there's txtid.. that txtid is the basis for my frm2's txtid..

if the user will enter a ID_no in frm2.. frm2's txtid will be compared with frm1's txtid.. if the two txtids' are match.. the user can now save the transaction, but if it is mismatch msgbox saying error will appeal..

i think there should be sqlsearch before sqlinsert..

Why do you need sqlsearch when comparing data in two forms? Perhaps you are not explaining this correctly?

why not use a combobox to populate data from from1 in form 2 for ID_no field.

I guess you want to make sure the UserID exists before such user can borrow a book from your library. If am right, then the best thing to do is as outlined:

1. Register users in your database
2. When users want to borrow a book, you do not compare your userID on form2 with form1 because that's a serious loophole as anyone can tyoe a randomID on form1 and do same on form2 to get a book so let the userID exist on a users table in your database
3. You should perform a user validation based on the userID entered on form2 with existing UserID's registered in your database.
If there's a match, then you save, if there's none, display an error message