473,322 Members | 1,232 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Form question - how to distinguish existing records

I have a form which has a DLookup in the Current event. I do not want this
DLookup to execute when I'm creating a new record. Is there a flag I could
test or is there another event I can put the DLookup in so that it won't
execute at all if the user is making a new record but will continue to work
as it currently does for existing records when they are displayed on the
form.

Robert
Nov 12 '05 #1
2 1625
Robert,

Modify your OnCurrent code to:

If Not Me.NewRecord Then
<<Do your DLookup >>
End If
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"Robert" <pr**********@yahoo.com> wrote in message
news:10*************@corp.supernews.com...
I have a form which has a DLookup in the Current event. I do not want this
DLookup to execute when I'm creating a new record. Is there a flag I could
test or is there another event I can put the DLookup in so that it won't
execute at all if the user is making a new record but will continue to work
as it currently does for existing records when they are displayed on the
form.

Robert

Nov 12 '05 #2
Just what I needed. Thanks!
"PC Datasheet" <sp**@nospam.spam> wrote in message
news:Ic*****************@newsread2.news.atl.earthl ink.net...
Robert,

Modify your OnCurrent code to:

If Not Me.NewRecord Then
<<Do your DLookup >>
End If
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"Robert" <pr**********@yahoo.com> wrote in message
news:10*************@corp.supernews.com...
I have a form which has a DLookup in the Current event. I do not want this DLookup to execute when I'm creating a new record. Is there a flag I could test or is there another event I can put the DLookup in so that it won't
execute at all if the user is making a new record but will continue to work as it currently does for existing records when they are displayed on the
form.

Robert


Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Robert | last post by:
I have a form which has a DLookup in the Current event. I do not want this DLookup to execute when I'm creating a new record. Is there a flag I could test or is there another event I can put the...
2
by: Rednelle | last post by:
Greetings all. Please help a real beginner using Access 2000. During experimentation with this program I have deleted many records from my main Table but the bottom left window always shows...
3
by: Simone | last post by:
Hi All, I have a Find Record button setup in most of my forms in order to find a specific customer's details. I have just noticed today though that this search will only find the customer if it...
1
by: SorboPos | last post by:
Hi. I have a form with continuous forms and a data entry section in the header of the form. (I.e. all transactions show in the main form area like a data sheet and the data for the highlighed...
1
by: KC | last post by:
Hello, I am using Access 2002. WinXP, Template from MS called Orders Mgmt DB. I have tweaked this DB to work for our small co. It has worked pretty well up until I made the mistake of deleting...
6
by: allyn44 | last post by:
HI--what I am trying to do is 2 things: 1. Open a form in either data entry mode or edit mode depending on what task the user is performing 2. Cancel events tied to fields on the form if I am in...
2
by: Robert | last post by:
I am trying to give the user dynamic search capabilities to select almost any record in the database from criteria they select. Everything seems to work except when I open the display form to...
13
by: kev | last post by:
Hi all, I have created a database for equipments. I have a form to register the equipment meaning filling in all the particulars (ID, serial, type, location etc). I have two buttons at the end...
0
by: don.fleming | last post by:
Greetings, Forms programming not my specialty, appreciated any advice on my direction I'm going with this. Basic need my client has is to "clone" the existing 3 tables records being viewed on a...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.