Textbox and query

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

Guest

Hi,

I have a form with 1 textboxes, named "Id". A list box named "Vendor".

Here's what I thought of doing. When I enter an ID into the textbox, a query
will run giving the matching Vendor in the list box.

It is assuming that a product can have more than 1 vendor.

I have no problem with doing the query. I just don't how to put everything
together to run smoothly.

All assistances are deeply appreciated!!!
 
Create a link in the Row Source of the List box to the text field in the form

Select [Field1Name], [Field2Name] From TableName Where [ID] = Forms![Enter
FormName here]![enter here the Text Field name in the form]

On the after update event of the Text box, refresh the list box

Me.[Enter here ListBoxName].Requery
 
Then what should I enter for Row Source Type????

Ofer said:
Create a link in the Row Source of the List box to the text field in the form

Select [Field1Name], [Field2Name] From TableName Where [ID] = Forms![Enter
FormName here]![enter here the Text Field name in the form]

On the after update event of the Text box, refresh the list box

Me.[Enter here ListBoxName].Requery

--
The next line is only relevant to Microsoft''s web-based interface users.
If I answered your question, please mark it as an answer. It''s useful to
know that my answer was helpful
HTH, good luck


Swish said:
Hi,

I have a form with 1 textboxes, named "Id". A list box named "Vendor".

Here's what I thought of doing. When I enter an ID into the textbox, a query
will run giving the matching Vendor in the list box.

It is assuming that a product can have more than 1 vendor.

I have no problem with doing the query. I just don't how to put everything
together to run smoothly.

All assistances are deeply appreciated!!!
 
Table/Query

What do you have now?
How do you display the values?

--
The next line is only relevant to Microsoft''s web-based interface users.
If I answered your question, please mark it as an answer. It''s useful to
know that my answer was helpful
HTH, good luck


Swish said:
Then what should I enter for Row Source Type????

Ofer said:
Create a link in the Row Source of the List box to the text field in the form

Select [Field1Name], [Field2Name] From TableName Where [ID] = Forms![Enter
FormName here]![enter here the Text Field name in the form]

On the after update event of the Text box, refresh the list box

Me.[Enter here ListBoxName].Requery

--
The next line is only relevant to Microsoft''s web-based interface users.
If I answered your question, please mark it as an answer. It''s useful to
know that my answer was helpful
HTH, good luck


Swish said:
Hi,

I have a form with 1 textboxes, named "Id". A list box named "Vendor".

Here's what I thought of doing. When I enter an ID into the textbox, a query
will run giving the matching Vendor in the list box.

It is assuming that a product can have more than 1 vendor.

I have no problem with doing the query. I just don't how to put everything
together to run smoothly.

All assistances are deeply appreciated!!!
 
It is still not working. Basically I want the listings in the list box to be
dependent on the value in the textbox.

What happened now is that everytime I update the textbox, the query runs and
I am prompt to enter the data in the textbox again to run the query.

Please help!!!

Ofer said:
Table/Query

What do you have now?
How do you display the values?

--
The next line is only relevant to Microsoft''s web-based interface users.
If I answered your question, please mark it as an answer. It''s useful to
know that my answer was helpful
HTH, good luck


Swish said:
Then what should I enter for Row Source Type????

Ofer said:
Create a link in the Row Source of the List box to the text field in the form

Select [Field1Name], [Field2Name] From TableName Where [ID] = Forms![Enter
FormName here]![enter here the Text Field name in the form]

On the after update event of the Text box, refresh the list box

Me.[Enter here ListBoxName].Requery

--
The next line is only relevant to Microsoft''s web-based interface users.
If I answered your question, please mark it as an answer. It''s useful to
know that my answer was helpful
HTH, good luck


:

Hi,

I have a form with 1 textboxes, named "Id". A list box named "Vendor".

Here's what I thought of doing. When I enter an ID into the textbox, a query
will run giving the matching Vendor in the list box.

It is assuming that a product can have more than 1 vendor.

I have no problem with doing the query. I just don't how to put everything
together to run smoothly.

All assistances are deeply appreciated!!!
 
Hi
I still need some details from you.
1. The Sql you use in the list box
2. How do you currently refresh the list

Swish said:
It is still not working. Basically I want the listings in the list box to be
dependent on the value in the textbox.

What happened now is that everytime I update the textbox, the query runs and
I am prompt to enter the data in the textbox again to run the query.

Please help!!!

Ofer said:
Table/Query

What do you have now?
How do you display the values?

--
The next line is only relevant to Microsoft''s web-based interface users.
If I answered your question, please mark it as an answer. It''s useful to
know that my answer was helpful
HTH, good luck


Swish said:
Then what should I enter for Row Source Type????

:

Create a link in the Row Source of the List box to the text field in the form

Select [Field1Name], [Field2Name] From TableName Where [ID] = Forms![Enter
FormName here]![enter here the Text Field name in the form]

On the after update event of the Text box, refresh the list box

Me.[Enter here ListBoxName].Requery

--
The next line is only relevant to Microsoft''s web-based interface users.
If I answered your question, please mark it as an answer. It''s useful to
know that my answer was helpful
HTH, good luck


:

Hi,

I have a form with 1 textboxes, named "Id". A list box named "Vendor".

Here's what I thought of doing. When I enter an ID into the textbox, a query
will run giving the matching Vendor in the list box.

It is assuming that a product can have more than 1 vendor.

I have no problem with doing the query. I just don't how to put everything
together to run smoothly.

All assistances are deeply appreciated!!!
 
Row source of list box (SQL): SELECT RawMaterialSetup.Vendor FROM
RawMaterialSetup WHERE RawMaterialSetup.RawMatID =
Forms!"CreateMaterial"!RawMatIDTxt

Name of the textbox is RawMatIDTxt

Refresh list is done by After Update of RawMatIDTxt.
Code:
Me!VendorCodeList.Requery

Ofer said:
Hi
I still need some details from you.
1. The Sql you use in the list box
2. How do you currently refresh the list

Swish said:
It is still not working. Basically I want the listings in the list box to be
dependent on the value in the textbox.

What happened now is that everytime I update the textbox, the query runs and
I am prompt to enter the data in the textbox again to run the query.

Please help!!!

Ofer said:
Table/Query

What do you have now?
How do you display the values?

--
The next line is only relevant to Microsoft''s web-based interface users.
If I answered your question, please mark it as an answer. It''s useful to
know that my answer was helpful
HTH, good luck


:

Then what should I enter for Row Source Type????

:

Create a link in the Row Source of the List box to the text field in the form

Select [Field1Name], [Field2Name] From TableName Where [ID] = Forms![Enter
FormName here]![enter here the Text Field name in the form]

On the after update event of the Text box, refresh the list box

Me.[Enter here ListBoxName].Requery

--
The next line is only relevant to Microsoft''s web-based interface users.
If I answered your question, please mark it as an answer. It''s useful to
know that my answer was helpful
HTH, good luck


:

Hi,

I have a form with 1 textboxes, named "Id". A list box named "Vendor".

Here's what I thought of doing. When I enter an ID into the textbox, a query
will run giving the matching Vendor in the list box.

It is assuming that a product can have more than 1 vendor.

I have no problem with doing the query. I just don't how to put everything
together to run smoothly.

All assistances are deeply appreciated!!!
 
Try and change the Row source to

SELECT RawMaterialSetup.Vendor FROM
RawMaterialSetup WHERE RawMaterialSetup.RawMatID =
Forms![CreateMaterial]![RawMatIDTxt]

--
The next line is only relevant to Microsoft''s web-based interface users.
If I answered your question, please mark it as an answer. It''s useful to
know that my answer was helpful
HTH, good luck


Swish said:
Row source of list box (SQL): SELECT RawMaterialSetup.Vendor FROM
RawMaterialSetup WHERE RawMaterialSetup.RawMatID =
Forms!"CreateMaterial"!RawMatIDTxt

Name of the textbox is RawMatIDTxt

Refresh list is done by After Update of RawMatIDTxt.
Code:
Me!VendorCodeList.Requery

Ofer said:
Hi
I still need some details from you.
1. The Sql you use in the list box
2. How do you currently refresh the list

Swish said:
It is still not working. Basically I want the listings in the list box to be
dependent on the value in the textbox.

What happened now is that everytime I update the textbox, the query runs and
I am prompt to enter the data in the textbox again to run the query.

Please help!!!

:

Table/Query

What do you have now?
How do you display the values?

--
The next line is only relevant to Microsoft''s web-based interface users.
If I answered your question, please mark it as an answer. It''s useful to
know that my answer was helpful
HTH, good luck


:

Then what should I enter for Row Source Type????

:

Create a link in the Row Source of the List box to the text field in the form

Select [Field1Name], [Field2Name] From TableName Where [ID] = Forms![Enter
FormName here]![enter here the Text Field name in the form]

On the after update event of the Text box, refresh the list box

Me.[Enter here ListBoxName].Requery

--
The next line is only relevant to Microsoft''s web-based interface users.
If I answered your question, please mark it as an answer. It''s useful to
know that my answer was helpful
HTH, good luck


:

Hi,

I have a form with 1 textboxes, named "Id". A list box named "Vendor".

Here's what I thought of doing. When I enter an ID into the textbox, a query
will run giving the matching Vendor in the list box.

It is assuming that a product can have more than 1 vendor.

I have no problem with doing the query. I just don't how to put everything
together to run smoothly.

All assistances are deeply appreciated!!!
 
Found the correct SQL

Should be as follow:
SELECT RawMaterialSetup.Vendor FROM
RawMaterialSetup WHERE (((RawMaterialSetup.RawMatID) =
Forms![CreateMaterial]!RawMatIDTxt))

Thank you very much for all the help.


Ofer said:
Try and change the Row source to

SELECT RawMaterialSetup.Vendor FROM
RawMaterialSetup WHERE RawMaterialSetup.RawMatID =
Forms![CreateMaterial]![RawMatIDTxt]

--
The next line is only relevant to Microsoft''s web-based interface users.
If I answered your question, please mark it as an answer. It''s useful to
know that my answer was helpful
HTH, good luck


Swish said:
Row source of list box (SQL): SELECT RawMaterialSetup.Vendor FROM
RawMaterialSetup WHERE RawMaterialSetup.RawMatID =
Forms!"CreateMaterial"!RawMatIDTxt

Name of the textbox is RawMatIDTxt

Refresh list is done by After Update of RawMatIDTxt.
Code:
Me!VendorCodeList.Requery

Ofer said:
Hi
I still need some details from you.
1. The Sql you use in the list box
2. How do you currently refresh the list

:

It is still not working. Basically I want the listings in the list box to be
dependent on the value in the textbox.

What happened now is that everytime I update the textbox, the query runs and
I am prompt to enter the data in the textbox again to run the query.

Please help!!!

:

Table/Query

What do you have now?
How do you display the values?

--
The next line is only relevant to Microsoft''s web-based interface users.
If I answered your question, please mark it as an answer. It''s useful to
know that my answer was helpful
HTH, good luck


:

Then what should I enter for Row Source Type????

:

Create a link in the Row Source of the List box to the text field in the form

Select [Field1Name], [Field2Name] From TableName Where [ID] = Forms![Enter
FormName here]![enter here the Text Field name in the form]

On the after update event of the Text box, refresh the list box

Me.[Enter here ListBoxName].Requery

--
The next line is only relevant to Microsoft''s web-based interface users.
If I answered your question, please mark it as an answer. It''s useful to
know that my answer was helpful
HTH, good luck


:

Hi,

I have a form with 1 textboxes, named "Id". A list box named "Vendor".

Here's what I thought of doing. When I enter an ID into the textbox, a query
will run giving the matching Vendor in the list box.

It is assuming that a product can have more than 1 vendor.

I have no problem with doing the query. I just don't how to put everything
together to run smoothly.

All assistances are deeply appreciated!!!
 
Back
Top