Is it possible to make a field disappear

Andrew_w

Registered User.
Local time
Today, 11:11
Joined
Jun 24, 2008
Messages
13
Or appear.

Say for example, you ask for payment type as in how are they gone pay for the goods, if they select check then you leave it at that, but if they select credit card then you make these fields appear which ask for the details of the credit card.

Would that be possible?
 
you can hide or show fields by using the visibility property i.e. Me.fieldname.visibility = true or false
 
In the AfterUpdate event of the payment type combo, show the necessary fields. you will need to call this event from the Current event of the form if you navigate to an existing record.

If Not Me.NewRecord Then
Call Form_AfterUpdate
End If
 
Let me just said that this place does not fail to amaze me.

But are you trying to open up a form Pat? I thought that was genius! I can't get it to work though, I do not think I know what Call Form_AfterUpdate is? It says sub or function not defined
 
Last edited:
My fault, you need to call the payment type combo's after update event, not the forms.

PS Max,
It's .visible NOT .visibility
 
Ohh I see, how would I add the fields in the AfterUpdate event of the payment type combo though? Would a Me.card_number do?
 
Last edited:
If cboPayType = "Credit card" Then
Me.Card_Number.Visible = True
Me.CheckNumber.Visible = False
Else
Me.Card_Number.Visble = False
Me.CheckNumber.Visible = True
End If
 

Users who are viewing this thread

Back
Top Bottom