magmike <ma******@yahoo.comwrote in
news:11**********************@m37g2000prh.googlegr oups.com:
Looking to do sort of the same thing you see on websites, but
on access form, where when a value is selected from a drop
down list, if it matches the desired value, certain form
fields appear.
For example, the records in my table are one of three types of
records, Owner, Member or Independent. I have fields in the
table that only correspond to Owner records and only want
those fields showing on the form if the CompanyType is
selected as Owner.
It is the same with Member and Independent. Although it's not
important, it would be cool if this could happen in the same
space on the form.
Can anyone help?
Sure...Each textbox has a visible property. Create a sub
procedure in the form's code module, and call that sub from the
form's current event, and the dropdown's afterUpdate event, too.
You didn't give control names, so use this as a template.
private sub cboRecordType_ShowHide()
select case cboRecordType
case "Owner"
me.txtaaaa visible = true
me.txtbbbb.visible = False
me.txtcccc.visible = false
case "Member"
me.txtaaaa visible = false
me.txtbbbb.visible = true
me.txtcccc.visible = false
case Else
me.txtaaaa visible = false
me.txtbbbb.visible = false
me.txtcccc.visible = true
end select
end sub
--
Bob Quintal
PA is y I've altered my email address.
--
Posted via a free Usenet account from
http://www.teranews.com