Auto Fill based on last record entry (1 Viewer)

L0b0

Registered User.
Local time
Today, 05:51
Joined
Jan 25, 2019
Messages
22
How might I go about setting up a form to auto-fill any information that was entered in the last record, based on a lookup field? I dont want to change the original record, I want it to just populate the field that have been entered already for a new entry. This way the table will track updates and changes.

Hope this makes sense :banghead:
 

L0b0

Registered User.
Local time
Today, 05:51
Joined
Jan 25, 2019
Messages
22
Ah yes, I would like to use it on the onload. But what values am I exactly changing in the code to match mine?
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 05:51
Joined
Aug 30, 2003
Messages
36,118
Replace "Control" with the name of your control (textbox, etc).

me!Control.DefaultValue = cQuote & me!Control.Value & cQuote
 

L0b0

Registered User.
Local time
Today, 05:51
Joined
Jan 25, 2019
Messages
22
I thought so but it doesnt seem to be doing anything for me.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 05:51
Joined
Aug 30, 2003
Messages
36,118
Can you attach the db here, with instructions on how to replicate the problem?
 

L0b0

Registered User.
Local time
Today, 05:51
Joined
Jan 25, 2019
Messages
22
I was testing it with the form labeled TESTupdates and for the moment the Order Amount field. It doesn't seem to work for me.
 
Last edited:

pbaldy

Wino Moderator
Staff member
Local time
Today, 05:51
Joined
Aug 30, 2003
Messages
36,118
Database password?
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 05:51
Joined
Aug 30, 2003
Messages
36,118
Seems to be working. I entered a record with 456 as the order amount, and when I went to a new record it had that as the default value.
 

L0b0

Registered User.
Local time
Today, 05:51
Joined
Jan 25, 2019
Messages
22
That's weird, I don't know why it isn't showing for me. This module works really well though. Thank you for your help!
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 05:51
Joined
Aug 30, 2003
Messages
36,118
Glad you have it working. Note that Allen's site points to the same link I gave you for "The first is best suited to setting a particular field"
 

Users who are viewing this thread

Top Bottom