Macro help

ysfpsu

Registered User.
Local time
Today, 05:06
Joined
Aug 2, 2005
Messages
17
Hey I have a form/table that has the field name 'Type'..I want so that when a user types in 'Staff', he is able to type in a phone number, but when he typs in 'ISP' he is able to type in the name of the ISP. I have no idea how to go about this so any help would be appreciated. I think a macro would have to be used.
Thanks
Yusuf
 
RE; Macro help

I wouldn't use a macro

I would create a table that contains all the values that the user would use to populate your field Type on your form

I would then create a combo box that selects these values from your new table (the combobox will replace your type field)

The user would then click on the combo box and select the value that they want.

in the combo box properties,event,afterupdate try this code

if [comboboxname] = "staff" then
Phonenumberfield.enabled = true
elsif
[comboboxname] = "ISP" then
IspField.enabled = true
end if

Ensure on the open of your form that the following fields are disabled
Phonenumberfield.enabled = false
IspField.enabled = false

you may have to play with the enabling and disabling if the user selects a value from the combo box and then changes their mind and selects another value.

Let us know how you get on
 

Users who are viewing this thread

Back
Top Bottom