Using combo box??? (1 Viewer)

croondevil

Registered User.
Local time
Yesterday, 20:41
Joined
May 30, 2009
Messages
14
hello,

In my form i have a combo box.from it the user can choose a customer and the billing address(personal info) will be filled in automatically.But in case of a cash customer billing address and such personal information is not neccessary.. So i was thinking of having a combo box to choose the customer type.If cash customer is choosen then i want to hide the billing address and personel info.If credit customer is choosen then the user will have to choose the customer as usual..So is this possible using combo boxes?

thx in advance:confused:
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 13:41
Joined
Jan 20, 2009
Messages
12,866
Few things are not possible in Access.:)

Use VBA OnUpdate event of the SaleType combobox to test the sale type and set the unwanted fields visible property to false if it is a cash sale.

If Me!comboSaleType = CashSaleID Then
Me!unwantedtextboxname.Visible = False
etc etc
Else
Me!unwantedtextboxname.Visible = True
etc etc
End If

There are plenty of variations.
Set the Foreground colour to the same as the background.
With the visible trick you might want to set the label invisible too or it would look a bit odd.
 

croondevil

Registered User.
Local time
Yesterday, 20:41
Joined
May 30, 2009
Messages
14
Thx this was great help indeed :D
 

croondevil

Registered User.
Local time
Yesterday, 20:41
Joined
May 30, 2009
Messages
14
sorry but theres one more problem. I have a field called customerID. when the user chooses customer type as "cash customer" i want the combo box to automatically update the customerID as "3"

I think this is possible using afterupdate event.But how??
 

Users who are viewing this thread

Top Bottom