Help needed asap

ysfpsu

Registered User.
Local time
Today, 11:19
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.
Thanks
Yusuf
 
Is this the Staff/ISP phone/Isp in the same field?
 
Well I'll give it a try

Assuming that the isp address and phone number are separate from the type field

I would have two field bound to the same source for phone/isp
use an imput mask for the format of the field. over lay both fields and set the visible property to no

Use an after update event on the type field to show the field you want


Code:
Private Sub Type_AfterUpdate()
If Me.Type.Value = "Staff" Then
Me.Phone.Visible = True
Me.ISP.Visible = False
End If

If Me.Type.Value = "Isp" Then
Me.ISP.Visible = True
Me.Phone.Visible = False
End If
End Sub
 
Do I put Number and ISP Name in the same table as type or should I make a seperate table?
 
That is not easy to answer without seeing your db and what you are doing with the data.
 
Tech-check warning: TYPE is a reserved word associated with field types. Using a reserved word as a field name is a guarantee to cause you headaches.

As to typing 'Staff' or 'ISP' - why aren't you making this a "Radio-Button" type of control and just let the user CHECKMARK it? Much easier, less space. If you are typing in a phone number with punctuation or an ISP name with punctuation, both are text fields. Make the text field long enough to hold either one. Then why do you CARE whether it is an ISP or a STAFF entry? (Other than for understanding what you are looking at...)
 
I'm thinking about doing just that but I was wondering whether the fact that whatever the user chose (staff or ISP) will be stored in the table.
 

Users who are viewing this thread

Back
Top Bottom