Need to make form field default to the value of the preceding field.

BruceWaller

New Member
Joined
Jul 12, 2011
Messages
9
How do I make my "ship to" address default to the value filled in on the previous field "bill to" address on my Access 2010 form. Thanks for your help. I've been googling for 20 minutes and striking out. Promised this database would be done tomorrow morning so I need to add as many user-friendly shortcuts, bells, and whistles as possible because I still have a ton of work to do on queries and reports. Thanks for your help.
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Assuming the field names are BillTo and ShipTo, put this code in the AfterUpdate event of BillTo:

Code:
Me.ShipTo = Me.BillTo

If you haven't built event code before, do this:
Double-click the blank row next to the After Update event (Properties, Event tab)
You should see [Event Procedure]. Now click on the ... button at the end of the line and you will be taken to the code window.
The blank line before End Sub is where the code goes.

Note: This is the method if both controls are text boxes. If one or morw of them is a combo box, you will need a slightly different approach. Let me know if that is the case, and what types of controls you are using.

Denis
 
Upvote 0

Forum statistics

Threads
1,223,520
Messages
6,172,811
Members
452,481
Latest member
Najwan

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