so i have a form with
4 textbox; idnum, lname, fname, dept
1 button

i need help about when I type in the idnum.Text there will be results based on the database table (ms access)and auto fill lname.Text... and if it doesn't exist there'll be a prompt.

In your SQL statement, use the WHERE clause...

SELECT * FROM YourTableNameHere WHERE YourFieldNameHereHoldingTheIdNum ='" & idnum.Text & "'"

Once the record is returned...

lname.Text = rs!lname ''rs is your recordset, lname is your field name holding the name value...
fname.Text = rs!fname
dept.Text = rs!dept

Also tru and use conventional naming as in txtLname rather than lname...