How do I input name in form & have it show phone number from anot.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to have a form that I can input a customer ID and have the
customer's information like phone numbers or address show up in the form.
How do i do that? I know how to query it so that the phone number or address
will show up but i want it to do that in the form. I tried putting the query
in the form as a subform but it doesn't work. Please help.
 
Jamie

There are a number of approaches to this type of scenario. Here's one...
Use an unbound control (probably either a combobox or a textbox) in the
form header section for the input of the Customer ID. In the criteria
of the query that the form is based on, refer to this control using
syntax such as [Forms]![NameOfForm]![YourControl]. Then, on the After
Update event of the control, put code like this...
Me.Requery
 
Steve I came accross your response to Jamie. I have the
same problem. I am better with formulas than code. Do
you think there is a way for me to do the same thing, but
an easier way.

Thank you

Michelle
-----Original Message-----
Jamie

There are a number of approaches to this type of scenario. Here's one...
Use an unbound control (probably either a combobox or a textbox) in the
form header section for the input of the Customer ID. In the criteria
of the query that the form is based on, refer to this control using
syntax such as [Forms]![NameOfForm]![YourControl]. Then, on the After
Update event of the control, put code like this...
Me.Requery

--
Steve Schapel, Microsoft Access MVP

I would like to have a form that I can input a customer ID and have the
customer's information like phone numbers or address show up in the form.
How do i do that? I know how to query it so that the phone number or address
will show up but i want it to do that in the form. I tried putting the query
in the form as a subform but it doesn't work. Please
help.
.
 
Steve I came accross your response to Jamie. I have the
same problem. I am better with formulas than code. Do
you think there is a way for me to do the same thing, but
an easier way.

Thank you

Michelle
-----Original Message-----
Jamie

There are a number of approaches to this type of scenario. Here's one...
Use an unbound control (probably either a combobox or a textbox) in the
form header section for the input of the Customer ID. In the criteria
of the query that the form is based on, refer to this control using
syntax such as [Forms]![NameOfForm]![YourControl]. Then, on the After
Update event of the control, put code like this...
Me.Requery

--
Steve Schapel, Microsoft Access MVP

I would like to have a form that I can input a customer ID and have the
customer's information like phone numbers or address show up in the form.
How do i do that? I know how to query it so that the phone number or address
will show up but i want it to do that in the form. I tried putting the query
in the form as a subform but it doesn't work. Please
help.
.
 
Steve I came accross your response to Jamie. I have the
same problem. I am better with formulas than code. Do
you think there is a way for me to do the same thing, but
an easier way.

Thank you

Michelle
-----Original Message-----
Jamie

There are a number of approaches to this type of scenario. Here's one...
Use an unbound control (probably either a combobox or a textbox) in the
form header section for the input of the Customer ID. In the criteria
of the query that the form is based on, refer to this control using
syntax such as [Forms]![NameOfForm]![YourControl]. Then, on the After
Update event of the control, put code like this...
Me.Requery

--
Steve Schapel, Microsoft Access MVP

I would like to have a form that I can input a customer ID and have the
customer's information like phone numbers or address show up in the form.
How do i do that? I know how to query it so that the phone number or address
will show up but i want it to do that in the form. I tried putting the query
in the form as a subform but it doesn't work. Please
help.
.
 
Steve I came accross your response to Jamie. I have the
same problem. I am better with formulas than code. Do
you think there is a way for me to do the same thing, but
an easier way.

Thank you

Michelle
-----Original Message-----
Jamie

There are a number of approaches to this type of scenario. Here's one...
Use an unbound control (probably either a combobox or a textbox) in the
form header section for the input of the Customer ID. In the criteria
of the query that the form is based on, refer to this control using
syntax such as [Forms]![NameOfForm]![YourControl]. Then, on the After
Update event of the control, put code like this...
Me.Requery

--
Steve Schapel, Microsoft Access MVP

I would like to have a form that I can input a customer ID and have the
customer's information like phone numbers or address show up in the form.
How do i do that? I know how to query it so that the phone number or address
will show up but i want it to do that in the form. I tried putting the query
in the form as a subform but it doesn't work. Please
help.
.
 
Michelle,

All of the other methods I can think of to achieve the same result are
more complex and require more code. In other words, the suggestion I
made to Jamie is the simplest way. Give it a try.
 
Steve said:
Jamie

There are a number of approaches to this type of scenario. Here's one...
Use an unbound control (probably either a combobox or a textbox) in the
form header section for the input of the Customer ID. In the criteria
of the query that the form is based on, refer to this control using
syntax such as [Forms]![NameOfForm]![YourControl]. Then, on the After
Update event of the control, put code like this...
Me.Requery

Steve,
This is exactly what I am trying to do also, with one exception. On the
After Update even, I want it to requery a subform. What would I put
instead of Me.Requery? The name of the subform is frmDropsAvailable.
Thanks,
Darrell
 
Darrell

The syntax would be like this...
Me.frmDropsAvailable.Form.Requery

However, an easier way in your situation might be to set the Link Master
Fields property of the subform to the name of the combobox. So when you
enter a new criteria in the combobox on the main form, the subform
records will autimatically update.
 
Back
Top