Help on DLookup Function

  • 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 Italic lines.
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.
 
D

Douglas J. Steele

Already answered in another newsgroup to which you posted the same question.

If you feel you need to post to more than one group (HINT: it's seldom
necessary), please have the courtesy to cross-post (send the one message to
all groups at once), rather than multi-post (send individual messages to
each group). In this way, all responses to your post will be available
together, regardless of what group the responder was in, and the rest of us
won't have to read your post multiple times. (It also uses fewer server
resources)

I'm not sure whether AccessMonster is capable of cross-posting. If not, I'd
suggest finding a better way to post...
 
W

Wasim Yasin via AccessMonster.com

Dear All
Please help me.


Wasim said:
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 Italic lines.
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.
 
A

Allen Browne

Wasim, we are not going to fragment the discussion here when it is already
taking place in another group.
 

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

Similar Threads


Top