Keeping the same record when moving between forms

andrewhoddie

Board Regular
Joined
Dec 21, 2008
Messages
114
Hi all

Hopefully this is a fairly simple one.

I have a form called DataEntry which has a field called ID which is an autonumber field which produces a reference number. Once the details are added there is are two buttons that can be pressed depending on the user. If command button 1 is pressed it takes you to form Initial Assessment and if Command button 2 is pressed it takes you to form ASB Initial Assessment.

When it redirects to the Initial Assessment form it does not keep the reference from the DataEntry form but starts at the first reference field. I would like it to keep the same record from as shown on the DataEntry form.

Example On DataEntry I add a new record with an ID of 30 and I press the Command Button 1 and the Form Initial Assessment opens but on record 1 not record 30.

Hopefully this makes sense, if not please do not hesitate to ask.

Thanks in advance for your assistance
Andrew
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
open the form with the ID in tow....

Rich (BB code):
sub Command button 1 _click()
 docmd.openform "Initial Assessment",,,"[id]=" & me.id
end sub

sub Command button 2 _click()
 docmd.openform "ASB Initial Assessment",,,"[id]=" & me.id
end sub
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top