Ca[ture Recordnumber

B

babs

Reposting haven't heard back See Below.

I have the below code in the Oncurrent event of the form and it is making
the username be updated as navigate to and from records. If I take this out
the username(in afterupdate of form) works fine and stays correct as navigate
records. Any way to capture the recordnumber on the form than back to the
table with out messing up the username as navigate???? See below and posting
on security for more backgrouned


Me![Recordnumber] = Me.CurrentRecord


Thanks,

Barb

Barb,
The problem you are having is because the Current event fires whenever you
navigate to a record -- next record, previous record, or NEW record. If you
have code in that event that creates a new record -- and filling fields based
on the previous record will do that -- then you will get a record added to
the table just by virtue of moving to a new record. If you want to avoid
that, then you MUST remove your code from the Current event.Lynn Trapp
Thought I would include the Main and Only code(see below) on the
OnCurrent
event of the form
Not seeing what from below can be causing the username to be put in as I
JUST navigate records????


Private Sub Form_Current()
Me![Recordnumber] = Me.CurrentRecord
Call AutoFillNewRecord([Forms]![QuoteEntryForm])
End Sub





babs 5/18/2006 9:16 AM PST



Lynn,

See posting above dated 5/16/06 I kept the fill record code ONCURRENT OF
FORM from previous record - only includes some fields - not username.-
Everything WORKS GREAT! HOWEVER HAD TO TAKE OUT:

Me![Recordnumber] = Me.CurrentRecord

for it to work. Is there Anyway I can capture the recordnumber and not mess
up the username while I navigate records.

thanks,
Barb
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top