PC Review


Reply
Thread Tools Rate Thread

Check Box to populate Shipping address controls

 
 
=?Utf-8?B?ampqaW1teWphbQ==?=
Guest
Posts: n/a
 
      16th Oct 2006
I have a form for customer information. The table has billing address and
shipping address information. What steps do I take with a check box if
checked to populate the shipping address information with billing address
information.
 
Reply With Quote
 
 
 
 
Arvin Meyer [MVP]
Guest
Posts: n/a
 
      16th Oct 2006
In the AfterUpdate event of the checkbox:

Sub chkMyCheckBox_AfterUpdate()
If Me.chkMyCheckBox = True Then
Me.txtShipToAddress = Me.txtBillToAddress
Me.txtShipToCity = Me.txtBillToCity
Me.txtShipToState = Me.txtBillToState
Me.txtShipToZip = Me.txtBillToZip
Else
Me.txtShipToAddress = ""
Me.txtShipToCity = ""
Me.txtShipToState = ""
Me.txtShipToZip = ""
End If
End Sub

--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"jjjimmyjam" <(E-Mail Removed)> wrote in message
news:36091671-4B01-47E2-A6F4-(E-Mail Removed)...
>I have a form for customer information. The table has billing address and
> shipping address information. What steps do I take with a check box if
> checked to populate the shipping address information with billing address
> information.



 
Reply With Quote
 
John Vinson
Guest
Posts: n/a
 
      16th Oct 2006
On Sun, 15 Oct 2006 16:44:01 -0700, jjjimmyjam
<(E-Mail Removed)> wrote:

>I have a form for customer information. The table has billing address and
>shipping address information. What steps do I take with a check box if
>checked to populate the shipping address information with billing address
>information.


Use the checkbox's AfterUpdate event:

Private Sub chkDupAddress_AfterUpdate
If Me.chkDupAddress Then 'did the user check it True?
Me.txtShippingAddress1 = Me.txtBillingAddress1
Me.txtShippingAddress2 = Me.txtBillingAddress2
Me.txtShippingCity = Me.txtBillingCity
<etc>
End If
End Sub


John W. Vinson[MVP]
 
Reply With Quote
 
=?Utf-8?B?ampqaW1teWphbQ==?=
Guest
Posts: n/a
 
      16th Oct 2006
Thanks.
This code affects all records though. Do I need to requery at some point?

"Arvin Meyer [MVP]" wrote:

> In the AfterUpdate event of the checkbox:
>
> Sub chkMyCheckBox_AfterUpdate()
> If Me.chkMyCheckBox = True Then
> Me.txtShipToAddress = Me.txtBillToAddress
> Me.txtShipToCity = Me.txtBillToCity
> Me.txtShipToState = Me.txtBillToState
> Me.txtShipToZip = Me.txtBillToZip
> Else
> Me.txtShipToAddress = ""
> Me.txtShipToCity = ""
> Me.txtShipToState = ""
> Me.txtShipToZip = ""
> End If
> End Sub
>
> --
> Arvin Meyer, MCP, MVP
> http://www.datastrat.com
> http://www.mvps.org/access
> http://www.accessmvp.com
>
> "jjjimmyjam" <(E-Mail Removed)> wrote in message
> news:36091671-4B01-47E2-A6F4-(E-Mail Removed)...
> >I have a form for customer information. The table has billing address and
> > shipping address information. What steps do I take with a check box if
> > checked to populate the shipping address information with billing address
> > information.

>
>
>

 
Reply With Quote
 
=?Utf-8?B?ampqaW1teWphbQ==?=
Guest
Posts: n/a
 
      16th Oct 2006
do i need a requery statement? All records are changing

"Arvin Meyer [MVP]" wrote:

> In the AfterUpdate event of the checkbox:
>
> Sub chkMyCheckBox_AfterUpdate()
> If Me.chkMyCheckBox = True Then
> Me.txtShipToAddress = Me.txtBillToAddress
> Me.txtShipToCity = Me.txtBillToCity
> Me.txtShipToState = Me.txtBillToState
> Me.txtShipToZip = Me.txtBillToZip
> Else
> Me.txtShipToAddress = ""
> Me.txtShipToCity = ""
> Me.txtShipToState = ""
> Me.txtShipToZip = ""
> End If
> End Sub
>
> --
> Arvin Meyer, MCP, MVP
> http://www.datastrat.com
> http://www.mvps.org/access
> http://www.accessmvp.com
>
> "jjjimmyjam" <(E-Mail Removed)> wrote in message
> news:36091671-4B01-47E2-A6F4-(E-Mail Removed)...
> >I have a form for customer information. The table has billing address and
> > shipping address information. What steps do I take with a check box if
> > checked to populate the shipping address information with billing address
> > information.

>
>
>

 
Reply With Quote
 
=?Utf-8?B?ampqaW1teWphbQ==?=
Guest
Posts: n/a
 
      16th Oct 2006
do i need a requery statement. all records are being affected

"John Vinson" wrote:

> On Sun, 15 Oct 2006 16:44:01 -0700, jjjimmyjam
> <(E-Mail Removed)> wrote:
>
> >I have a form for customer information. The table has billing address and
> >shipping address information. What steps do I take with a check box if
> >checked to populate the shipping address information with billing address
> >information.

>
> Use the checkbox's AfterUpdate event:
>
> Private Sub chkDupAddress_AfterUpdate
> If Me.chkDupAddress Then 'did the user check it True?
> Me.txtShippingAddress1 = Me.txtBillingAddress1
> Me.txtShippingAddress2 = Me.txtBillingAddress2
> Me.txtShippingCity = Me.txtBillingCity
> <etc>
> End If
> End Sub
>
>
> John W. Vinson[MVP]
>

 
Reply With Quote
 
John Vinson
Guest
Posts: n/a
 
      16th Oct 2006
On Sun, 15 Oct 2006 17:23:01 -0700, jjjimmyjam
<(E-Mail Removed)> wrote:

>This code affects all records though. Do I need to requery at some point?


Eh?

It only affects all records if the ShipTo fields are unbound. Are you
trying to "store" them in the Form? or do you have fields for them in
your table?

John W. Vinson[MVP]
 
Reply With Quote
 
=?Utf-8?B?ampqaW1teWphbQ==?=
Guest
Posts: n/a
 
      16th Oct 2006
My record source for the form is a query. I suppose that makes a difference

"John Vinson" wrote:

> On Sun, 15 Oct 2006 17:23:01 -0700, jjjimmyjam
> <(E-Mail Removed)> wrote:
>
> >This code affects all records though. Do I need to requery at some point?

>
> Eh?
>
> It only affects all records if the ShipTo fields are unbound. Are you
> trying to "store" them in the Form? or do you have fields for them in
> your table?
>
> John W. Vinson[MVP]
>

 
Reply With Quote
 
=?Utf-8?B?ampqaW1teWphbQ==?=
Guest
Posts: n/a
 
      16th Oct 2006
my record source for the form is a select query.

"jjjimmyjam" wrote:

> do i need a requery statement. all records are being affected
>
> "John Vinson" wrote:
>
> > On Sun, 15 Oct 2006 16:44:01 -0700, jjjimmyjam
> > <(E-Mail Removed)> wrote:
> >
> > >I have a form for customer information. The table has billing address and
> > >shipping address information. What steps do I take with a check box if
> > >checked to populate the shipping address information with billing address
> > >information.

> >
> > Use the checkbox's AfterUpdate event:
> >
> > Private Sub chkDupAddress_AfterUpdate
> > If Me.chkDupAddress Then 'did the user check it True?
> > Me.txtShippingAddress1 = Me.txtBillingAddress1
> > Me.txtShippingAddress2 = Me.txtBillingAddress2
> > Me.txtShippingCity = Me.txtBillingCity
> > <etc>
> > End If
> > End Sub
> >
> >
> > John W. Vinson[MVP]
> >

 
Reply With Quote
 
John Vinson
Guest
Posts: n/a
 
      16th Oct 2006
On Sun, 15 Oct 2006 18:27:02 -0700, jjjimmyjam
<(E-Mail Removed)> wrote:

>my record source for the form is a select query.
>


Please post the SQL of the query, the code you're using, and the
Control Source properties of the shipping address controls on the
form.

John W. Vinson[MVP]
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CHECK BOX, BILLING ADDRESS = SHIPPING ADDRESS Carol Shu Microsoft Access 5 12th Dec 2008 09:21 PM
shipping address and a return address on 1 label???! climbergirl17 Microsoft Word Document Management 1 9th Aug 2008 05:47 AM
how to check shipping order status =?Utf-8?B?Y2RvZ21u?= Windows Vista General Discussion 3 21st Sep 2006 05:10 PM
Same Shipping Address =?Utf-8?B?Sm9obmptbg==?= Microsoft Access 1 29th Jul 2005 12:25 AM
Check Box for Same Billing/Shipping Address Brook Microsoft Access Forms 4 15th Jun 2004 07:13 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:44 PM.