473,320 Members | 2,012 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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
2 1630
puppydogbuddy
1,923 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

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

Similar topics

3
by: Pat | last post by:
Hello, I've used Sum() to total bound fields on a continuous form with no problem. However, I now have a continuous form, on which I use an unbound field to calculate the number of hours between...
2
by: mcl chan | last post by:
Hello all, I'm using below code for c# app to call another app { System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc Enable.RaisingEvents=false; proc...
3
by: Kevin Bowser | last post by:
I am having trouble updating the text in a C# form textbox from outside the class. Calling function ChangeDisplay from inside the class ControlPanel works fine, but when I call it from the main...
28
by: kfrost | last post by:
I know this is probably simple but I have a C# form and the class for the form is called sbaSynch. I have a textbox name txtServerName. I'm creating a class to manipulate XML functions so I...
22
by: DraguVaso | last post by:
Hi, For my application I need the following behavior: When I press F4 the cursor has to move to the next line in my multiline textbox which begins with "0". Finding lines starting with 0 isn't...
3
by: google | last post by:
I'm developing an application for use within my company in Access 2003. I'm new to '03, the application I did for my former employer was in '97. The two applications have similar functionality...
1
by: planetthoughtful | last post by:
Hi All, I have a mainform with a subform in which I show some task summary data. On the mainform I have a number of unbound controls that reflect values relevant to each task in the subform....
3
by: Richard | last post by:
How is the result of query placed in a unbound textbox ? Suppose CriteriaLookups has columns TableName, KeyColumn, KeyValue, DataColumn Foo,x,11,xhat Bar,z,3,xyzzy And
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.