|
|
Control box question
I have a form that opens when you run a query. (example: employee last name)
Then when I want to look up another name I want to do it from the form
instead of closing the form.
So I added a control box to the form to run the query again.
The problem is that it opens up a new form, so if I do multiple searches I
will have a lot of open forms.
So the the question is: Can I set up the control box to run the query and
open it in the same form or at least close the last form when it opens a new
one?
If so how is this done?
Thanks
Eric
|
|
0
|
|
|
|
Reply
|
Utf
|
12/21/2009 3:25:01 PM |
|
How about placing an unbound combo box at the top of the form?
Here's how:
Using a Combo Box to Find Records
at:
http://allenbrowne.com/ser-03.html
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Eric Starn" <EricStarn@discussions.microsoft.com> wrote in message
news:A4EB29CB-30DC-4010-9D4F-27BFCFF48688@microsoft.com...
> I have a form that opens when you run a query. (example: employee last
> name)
> Then when I want to look up another name I want to do it from the form
> instead of closing the form.
> So I added a control box to the form to run the query again.
> The problem is that it opens up a new form, so if I do multiple searches I
> will have a lot of open forms.
> So the the question is: Can I set up the control box to run the query and
> open it in the same form or at least close the last form when it opens a
> new
> one?
> If so how is this done?
>
> Thanks
>
> Eric
|
|
0
|
|
|
|
Reply
|
Allen
|
12/21/2009 3:53:03 PM
|
|
Eric,
I would put the code for closing the form at the end of the code that
re-runs the query. This is how I close my single use forms.
"Eric Starn" wrote:
> I have a form that opens when you run a query. (example: employee last name)
> Then when I want to look up another name I want to do it from the form
> instead of closing the form.
> So I added a control box to the form to run the query again.
> The problem is that it opens up a new form, so if I do multiple searches I
> will have a lot of open forms.
> So the the question is: Can I set up the control box to run the query and
> open it in the same form or at least close the last form when it opens a new
> one?
> If so how is this done?
>
> Thanks
>
> Eric
|
|
0
|
|
|
|
Reply
|
Utf
|
12/21/2009 4:28:01 PM
|
|
"Eric Starn" <EricStarn@discussions.microsoft.com> wrote in message
news:A4EB29CB-30DC-4010-9D4F-27BFCFF48688@microsoft.com...
>I have a form that opens when you run a query. (example: employee last
>name)
> Then when I want to look up another name I want to do it from the form
> instead of closing the form.
> So I added a control box to the form to run the query again.
> The problem is that it opens up a new form, so if I do multiple searches I
> will have a lot of open forms.
> So the the question is: Can I set up the control box to run the query and
> open it in the same form or at least close the last form when it opens a
> new
> one?
> If so how is this done?
Your terminology is unusual, so I'm not sure what you mean.
When you say "control box", do you mean a combo box?
What do you mean, the "form opens when you run a query"? Normally a form
would be based on the query, such that the query would be run (as the form's
recordsource) when you run the form, not the other way around. What is the
code (or macro actions) that you use to open the form?
What is the code behind the "control box" that "runs the query again"?
--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html
(please reply to the newsgroup)
|
|
0
|
|
|
|
Reply
|
Dirk
|
12/21/2009 5:33:51 PM
|
|
|
3 Replies
156 Views
(page loaded in 0.049 seconds)
Similiar Articles: Control disable/enable question - microsoft.public.access.forms ...I'm trying to enable/disable a command button, based on a check box(table field), on a continuous form. This form is a one-liner with only 6 items. T... ComboBox/Page Down Question - microsoft.public.accessPiet, the combo box size is 0.011 Height and 0.011 Width....Thanks bob ... If the ComboBox control ... His question was basically HOW to handle a "change" event from ... Update a date/time control when check box control is updated ...... dependent on combo box in separate ..... set the check box ... unbound control, then you would need to use SQL to update ... combo box and the checkbox in question ... VBA Question - find closest next number - microsoft.public.access ...Hi, I have a form with a combobox control that list some sizes. They are: 12 18 20 22 I have another text box for keying a custom size, such as 12... return focus to previous control - microsoft.public.access ...... Post Question Groups ... Forms - Set Focus to previous control in list box Set Focus to previous control in list box ... Make box control not visible based on condition - microsoft.public ...... Post Question Groups ... EmpEndDate control when its value is 'hidden', but would not see ... Make box control ... Forms Check Box cell link - microsoft.public.excel.misc ...I created a box over cell D4. Using the Format Control box, I linked the check box... ... > >(Unless I'm reading the question wrong...) > >ps. For just this few checkboxes, I ... Access combo box control by another data field - microsoft.public ...... Post Question Groups ... Access Tutorial 8: Combo Box Controls Access Tutorial 8: Combo Box Controls 8.1 ... that ... Text Box Control contains generated hyperlink - microsoft.public ...... Post Question Groups ... Hyperlink field that is bound to a text box control. You only need to know the name of ... Where is the zoom control box I want to adjust width - microsoft ...... Post Question Groups ... I need to be able to adjust the font size dynamically based on ... Make box control ... (Remote) Control Box question - iboats Boating ForumsSure the info has to be on here somewhere, but my searches have been so-far ... Originally Posted by tboydva Sure the info has to be on here somewhere, but my ... MudmotorTalk.com - View topic - Prodrive Control Box QuestionBoats & Blinds Forum ... "Got my first Prodrive recently and only had a chance to run it once. I have a 18 ..." · "im not sure if you could do that or not. i have ... control box questionstrying to fiqure out this control box,,,,,what wires do what,,,,im putting it on a ... ok so the plug with the red green and blue wires would have gone to your wires ... Johnson control box handle question[ATTACH=CONFIG[ATTACH=CONFIG]88830[/A TTACH]]88828[/ATTACH] I have a 1996 Johnson model j50tleds.the shifter on the control box.has broken its in 2 Outboard Motor Repair Evinrude Power Pilot Control Box Question ...Outboard motor repair evinrude power pilot control box question. Outboard motor carburetors are typically sidedraft, because the system will deliver, thereby ... 7/11/2012 11:43:35 AM
|
|
|
|
|
|
|
|
|