467,877 Members | 1,141 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,877 developers. It's quick & easy.

Unbound TextBox Control doesn't start the MainForm search

Hello,
I've read thru numerous post/archives trying to decipher the cause of my problem to no avail. I'm just basically trying to conduct a search by using a form in order to locate data that may or may not be in one field of an associated table/query. Here's my 3-step process.
1) I click on the name of my Main form (that I've already created along with a subform and query and an click-on command button) and it prompts me with an "Enter Parameter Value" diablog box. 2a) If I enter a username that I know is there, the Mainform appears with data results only populated in the Subform area (nothing gets populated in the Unbound TextBox control area). 2b) If I enter a username that I know is NOT there, it returns a data entry screen with all fields blank (empty) or it clears out the previously populated subform area conducted by a previous search, which is fine. 3) When I try to conduct my second username search (on a different and known username) from within this MainForm/Subform area by entering data in the Unbound TextBoxControl field and clicking on my customized Command button, I am then prompted again (just like in step1) by the "Enter Parameter Value" dialog box so that I can re-enter the data that I just tried to enter in the Unbound TextBoxControl.

The search does retrieve the appropriate data but I have to initiate the search in such an awkward two-step manner that it makes me wonder why I even need the UnboundTextBox Control in the first place.

Any suggestions would be greatly appreciated.
Feb 18 '08 #1
  • viewed: 1443
Share:
2 Replies
puppydogbuddy
Expert 1GB
Hello,
I've read thru numerous post/archives trying to decipher the cause of my problem to no avail. I'm just basically trying to conduct a search to locate data that may or maynot be in one field. Here's my 3-step process.
1) I click on the Main form and it prompts me with an "Enter Parameter Value" diablog box. 2a) If I enter a username that I know is there, the form appears with data results only populated in the Subform area (nothing in the Ubound TextBox control). 2b) If I enter a username that I know is not there, it returns a blank screen or clears out the previously populated subform area, which is fine. 3) When I try to conduct my second username search (on a different and known username) from within this MainForm/Subform area using the Unbound TextBoxControl and clicking on the Customized Command button, I am then prompted by the "Enter Parameter Value" dialog box so that I can re-enter the data that I just tried to enter in the Unbound TextBoxControl.

The search does retrieve the appropriate data but I have to initiate the search in such an awkward two-step manner that it makes me wonder why I even need the UnboundTextControl box in the first place.

Any suggestions
It would be helpful if you posted your search query. Nonetheless, here are two possibilities to look into:
1. In your search query, there should be a reference to the unboundTextControl box..
"Select username, blah, blah From YourTable Where UserName Like '" & UnboundTextControl & "'"

2. Even if you are referencing the unboundTextControl box correctly in your query, Access often wants the parameter declared. To declare your parameter, place the query in design view; goto Access command menu; click query button, then select parameters to get the parameter dialog box.

Hope this helps.
Feb 18 '08 #2
It would be helpful if you posted your search query. Nonetheless, here are two possibilities to look into:
1. In your search query, there should be a reference to the unboundTextControl box..
"Select username, blah, blah From YourTable Where UserName Like '" & UnboundTextControl & "'"

2. Even if you are referencing the unboundTextControl box correctly in your query, Access often wants the parameter declared. To declare your parameter, place the query in design view; goto Access command menu; click query button, then select parameters to get the parameter dialog box.

Hope this helps.
Thanks for the advice. I had not made reference to the UnboundTextBox Control in the query at all...i'll give that a try and keep you posted. Thanks again.
Feb 18 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Kevin Bowser | last post: by
28 posts views Thread by kfrost | last post: by
reply views Thread by jack112 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.