By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,153 Members | 2,581 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,153 IT Pros & Developers. It's quick & easy.

dlookup function error

P: n/a
dear sir,

i would like to get your assitance about the above issues, can't find
any better slutions or codes

- table name: MOTOR2000
- field name1: POLICYNO
- field name2: ExPolicyNo

i made the form for above where is one button for renewal policy, so
one user click, so POLICYNO will go to exPolicyno and new policy no
will be assign by user...but before this actions done, i wanted to put
if check that fails

I want before renewal policy, means if the there is any value of
POLICYNO exsists in ExPolicyNo so it should prompt user that policy
already exsist so can't renew, if not then renew and go ahead

i try all various types of codes and i get stucks could nt success it
gives me error like "previous actions cancel by opertion error no 2001
somthing..."

++++++++++++++
If IsNull(DLookup("[expolicyno]", "MOTOR2000", POLICYNO.Value)) Then
MsgBox ("You can renew policy")

Else
MsgBox ("you can't renew policy as it is already renewed")
End If
+++++++++++++

thanks and kind regards

urs student

shahzad
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
MUHAMAMD SALIM SHAHZAD wrote:
dear sir,

i would like to get your assitance about the above issues, can't find
any better slutions or codes

- table name: MOTOR2000
- field name1: POLICYNO
- field name2: ExPolicyNo

i made the form for above where is one button for renewal policy, so
one user click, so POLICYNO will go to exPolicyno and new policy no
will be assign by user...but before this actions done, i wanted to put
if check that fails

I want before renewal policy, means if the there is any value of
POLICYNO exsists in ExPolicyNo so it should prompt user that policy
already exsist so can't renew, if not then renew and go ahead

i try all various types of codes and i get stucks could nt success it
gives me error like "previous actions cancel by opertion error no 2001
somthing..."

++++++++++++++
If IsNull(DLookup("[expolicyno]", "MOTOR2000", POLICYNO.Value)) Then
MsgBox ("You can renew policy")

Else
MsgBox ("you can't renew policy as it is already renewed")
End If
+++++++++++++

thanks and kind regards


DLookup("[expolicyno]", "MOTOR2000", "Policyno='" & POLICYNO.Value & "'")
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.