All,
I have a table with the following fields: id (autonumber field), name, position, & phone.
I have a query is used as a value list for the name field.
I have a form that it is associated with that table. I have an unbound text field that is associated with the query for the values for the name field.
I also have code that if the name is not in the table, it will prompt the user to either add or not add the new value.
I have hardcode on the AfterUpdate event for the unbound field (poc_name), to automatically populate the name, position, and phone fields.
The code is as follows:
Private Sub poc_name_AfterUpdate()
If poc_name = "Doe, John" Then
name = "Doe, John"
position = "Supervisor"
phone = "777-9311"
End If
I would like to not have to do that for everybody that gets added to the table. I would like to be able to if someone gets added to the table, it would automatically fill in the name, position, and phone fields.
For example if I use the pulldown that has several names in it, and I chose one which is Bell, Sylvia, I would like for it to automatically fill in the name, position, & phone fields without me having to go in and hardcode like I have above.
Is there a easy way to do this?
Any help will be much appreciated?
Thanks in advance,
Jerome Benton
JERPAT Web Designs
GOD Is Good All The Time!!!
I have a table with the following fields: id (autonumber field), name, position, & phone.
I have a query is used as a value list for the name field.
I have a form that it is associated with that table. I have an unbound text field that is associated with the query for the values for the name field.
I also have code that if the name is not in the table, it will prompt the user to either add or not add the new value.
I have hardcode on the AfterUpdate event for the unbound field (poc_name), to automatically populate the name, position, and phone fields.
The code is as follows:
Private Sub poc_name_AfterUpdate()
If poc_name = "Doe, John" Then
name = "Doe, John"
position = "Supervisor"
phone = "777-9311"
End If
I would like to not have to do that for everybody that gets added to the table. I would like to be able to if someone gets added to the table, it would automatically fill in the name, position, and phone fields.
For example if I use the pulldown that has several names in it, and I chose one which is Bell, Sylvia, I would like for it to automatically fill in the name, position, & phone fields without me having to go in and hardcode like I have above.
Is there a easy way to do this?
Any help will be much appreciated?
Thanks in advance,
Jerome Benton
JERPAT Web Designs
GOD Is Good All The Time!!!