Dlookup Function need help

  • Thread starter Wasim Yasin via AccessMonster.com
  • Start date
W

Wasim Yasin via AccessMonster.com

Dear All

I have fileds like Emp no, Name, Grade etc. in my Master table. I also have a
transaction table 'TADA' having the same fileds. The form is based on
transaction table 'TADA'. Now I used the dlookup function on 'Emp No' field
of form as following.

If IsNull(DLookup("[EmpNo]", "Combine", "[EmpNo]=forms![TADA]!EmpNo")) Then
MsgBox "Please Enter Correct Emp No."
EmpNo.Undo
Cancel = True
End If
I'm getting error on last two lines i.e.
EmpNo.Undo
Cancel = True
Second I want that when a n emp no matched with master table then the name,
grade and designation fileds of form populated with master table fileds of
name, grade and designation and control transfer to naxt field. Is it
possible or not? Please help.

Thanx.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top