473,473 Members | 2,021 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

dlookup function error

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
1 1264
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ronny Sigo | last post by:
Hello all, I already put the same question, only now I have more to tell ... Although I used this code before in the same routine (only the fieldname of the table differs) ___ at this point in the...
6
by: JLM | last post by:
What am I missing here? I have a form where I enter a "Class Code". This value corresponds to what sits in table "class code descriptions" along with the "title" of each "class code." Key...
2
by: Sue | last post by:
I sent an e-mail below and got a responese but i still have the #error message in the subject below: Can someone help me: questions and replies are separted by ----- -------My Questions: I have...
1
by: Thelma Lubkin | last post by:
I am still struggling with trying to match a user supplied string with strings in a field of a table, where spaces are to be ignored. Arno suggested that I use the Dlookup function, but I...
4
by: MLH | last post by:
I have tried using DLookUp in this manner... If DLookUp("","tblClients","='2021234567'") Then MsgBox "Found it!" End If I am wondering if that is a misuse of the DLookUp command? Type...
6
by: Don Sealer | last post by:
I've written this expression for a DLookup function. It works almost alright. What I'm trying to do is type in a description and the ID field (number) populates automatically. It works almost as...
2
by: Don | last post by:
Can someone help me fix my DLookup problem. I'm far from proficiency with Access. I've been creating databases for several years for work with the help of many of you and trial and error. I have...
8
by: MLH | last post by:
The following SQL returns PRECISELY what I want: SELECT TOP 1 tblCorrespondence.CorrespID, tblOutboundTypes.OTypDescription, tblCorrespondence.OutDate, tblCorrespondence.VehicleJobID,...
2
by: jonvan20 | last post by:
I have been having trouble with a simple Dlookup command that was Reccommended to me by a nice fellow named Vic, On the other hand I have statements like this that wont run they give me a run time...
0
by: Sebastian | last post by:
Hello I develop my applications in Access 2002. My development system is running Windows XP SP2 and I have Microsoft Office XP Developer. Microsoft Office XP is at SP3. I used Inno Setup (great...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.