473,383 Members | 1,742 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,383 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 1633
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: 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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.