Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / May 2005

Tip: Looking for answers? Try searching our database.

Automically populate one field to another but change if necessary

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kat - 18 May 2005 18:55 GMT
We have a database with a mailing address and ship to address.  We want the
mailing address to automatically populate to the ship to address but we want
to be able to change the ship to address, if needed, without having an effect
on the mailing address.  The Northwind DB sent with Access does that but we
haven't been able to find how it's done.
Signature

kat

Wayne Morgan - 18 May 2005 20:26 GMT
In the AfterUpdate event of the controls where you enter the mailing
address, copy the values to the ship to address. This will allow you to
still modify the ship to address if you want to. You could also create a
button to do this if you prefer.

Example:
Me.txtShippingAddress1 = Me.txtMailingAddress1

You would do this for each control that contains the address information
(i.e. Street Address, City, State, Zip, etc). If you use a button, you would
fill in all of the address controls then copy all of them in the button's
Click event. You may want to allow for a value already being in the shipping
address.

Example:
If IsNull(Me.txtShippingCity) Then
   Me.txtShippingCity = Me.txtMailingCity
End If

Signature

Wayne Morgan
MS Access MVP

> We have a database with a mailing address and ship to address.  We want
> the
[quoted text clipped - 5 lines]
> we
> haven't been able to find how it's done.
John Nurick - 18 May 2005 22:03 GMT
Hi Kat,

Northwind does it with a few lines of VBA in the AfterUpdate event
prodedure of the CustomerID combobox on the Orders form.

>We have a database with a mailing address and ship to address.  We want the
>mailing address to automatically populate to the ship to address but we want
>to be able to change the ship to address, if needed, without having an effect
>on the mailing address.  The Northwind DB sent with Access does that but we
>haven't been able to find how it's done.

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.