Help With CheckBox

B

billy_pit

Hi,
My Project is in MS Access.
In that I am using one form for Shipping Entry.
In That I put One Check Box.
Now If Shipping Address and Billing Address Are same than I click on
that CheckBox.So It will automaticaly enter whatever address entered
in Billing Address into Shipping Address.Now uptill this point
everything working fine.

Now I want this thing.
When I click again on that CheckBox Than it will automaticaly Delete
Shipping Address.So If I want to enter Different Shipping Address I
can.And If I clicked again after that than it will again automaticaly
enter the Billing Address in Shipping Address.But I don't know how to
do it?

In VB we can use (I don't know proper code for VB) something like this
if(CheckBox1.checked=true) then
xyz
else
xyz

Like I want to know how can I check that CheckBox Is Clicked before or
not.
Thanks.
 
A

Armen Stein

Hi,
My Project is in MS Access.
In that I am using one form for Shipping Entry.
In That I put One Check Box.
Now If Shipping Address and Billing Address Are same than I click on
that CheckBox.So It will automaticaly enter whatever address entered
in Billing Address into Shipping Address.Now uptill this point
everything working fine.

Now I want this thing.
When I click again on that CheckBox Than it will automaticaly Delete
Shipping Address.So If I want to enter Different Shipping Address I
can.And If I clicked again after that than it will again automaticaly
enter the Billing Address in Shipping Address.But I don't know how to
do it?

In VB we can use (I don't know proper code for VB) something like this
if(CheckBox1.checked=true) then
xyz
else
xyz

Like I want to know how can I check that CheckBox Is Clicked before or
not.
Thanks.

Use the After Update event of the Checkbox. It will fire only if your
user changes the checkmark.

If CheckBox1 = True then
'copy in all your Shipping values
Else
'clear all your Shipping values
End If

Armen Stein
Microsoft Access MVP
www.JStreetTech.com
 
E

Evi

billy_pit said:
Hi,
My Project is in MS Access.
In that I am using one form for Shipping Entry.
In That I put One Check Box.
Now If Shipping Address and Billing Address Are same than I click on
that CheckBox.So It will automaticaly enter whatever address entered
in Billing Address into Shipping Address.Now uptill this point
everything working fine.

Now I want this thing.
When I click again on that CheckBox Than it will automaticaly Delete
Shipping Address.So If I want to enter Different Shipping Address I
can.And If I clicked again after that than it will again automaticaly
enter the Billing Address in Shipping Address.But I don't know how to
do it?

In VB we can use (I don't know proper code for VB) something like this
if(CheckBox1.checked=true) then
xyz
else
xyz

Like I want to know how can I check that CheckBox Is Clicked before or
not.
Thanks.

Perhaps you could try this:
In the After Update Event of the CheckBox have
If Me.YourCheckBox = True Then
'put in code to fill in Shipping Data
end If
If Me.YourCheckBox = False Then
'code to delete shipping data in box
End if

Evi
 
B

billy_pit

I tried this one and its working.
In the After Update Event of the CheckBox have
If Me.YourCheckBox = -1 Then
'put in code to fill in Shipping Data
Else
'code to delete shipping data in box
End if

Thanks for ur reply.
 

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

Top