Copy Previous field

  • Thread starter Thread starter Al Campagna
  • Start date Start date
A

Al Campagna

Is there a VB command that would fill in the value of a field from the value
in that same field in the previous record.

This would be the equivalent of the Ctrl-Apostrophe shortcut keys.

If not, is there another recommended method someone could suggest to
accomplish this.

TIA,
Al Camp
 
Al said:
Is there a VB command that would fill in the value of a field from the value
in that same field in the previous record.

This would be the equivalent of the Ctrl-Apostrophe shortcut keys.

If not, is there another recommended method someone could suggest to
accomplish this.

Not sure if this is what your looking for, but I often use
the text box's AfterUpdate event to set its DefaultValue
property to its value:

Me.textbox.DefaultValue = """" & Me.textbox.Value & """"

This will automatically set the text box to the same value
as the previous record as soon as the user starts to enter
something in any bound control.
 
Marshall,
Thanks for the info.
I considered using that method, but due to the users moving amongst many
records (where the "previous record's" value will change) I thought that
setting/controlling "default values" might be a bit of a juggling act.
Given your knowledge of Access... I take it there is no VB equivalent
command to Ctrl-Apostrophe.

I think I may try to figure out how to "programmatically" do a cut &
paste of the previous record's 15 fields, (which will be 90% correct for the
new record), and then adjust/allow user to enter, those few fields that
differ.

Thanks for your help.
Al Campagna
Candia Computer Consulting
Candia, NH
 

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

Back
Top