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

Form question - how to distinguish existing records

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.