Form based on parameter query

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

Guest

Before my form opens, a parameter query runs, this was working but now the
form just opens without the query running. I have checked record source and
everything i have checked object dependencies and it shows the query but the
query has stopped running when i open the form! what has gone wrong??? the
weird thing is, that when i copy and paste this form, the query runs before
the copied form opens, but not the original form!! its as if its not
recognising that its record source is the query. help thanks
 
Hi, Debba,
What is initiating the form and query to open or run? I think the problem
may be here. Just reply to this thread and I will try and help further once
I get the info...

THANKS!!!
Chip
 
Thanks Chip for your help. When I want to open the form, i can either select
it in the main window under forms, or i have it on my switchboard that opens
the form in edit mode, have tried in add mode too and again the copied form
works fine in both modes but the original does not. the form is based on a
parameter query so when it is activated, the query is supposed to start first
by asking me for a customers registration number, that i type in and then the
query returns that record onto the form which i can then make changes if a
wish. hope this is the information you need to help me thanks again, Deb
 
Deb,
Have you thought about having a filter on the Form instead if using the
Parameter query? You can use a wizard to build you a combo-box that selects
the entry from the drop-down or you can even start typing ad it will start
narrowing down the choices in the dropdown as you type. This helps with
people who can mispell something in the parameter box and getting a blank
form.

Let me know if this sounds do-able and I will help you with building the
combo-box or if it will not work I will dig deeper...

Hope this helps,
THANKS!!!
Chip
 
thats a good idea, but the parameter box is supposed to show before the form
has actually opened - thats the query activating so then the form can open
with the record i ask for. this was working but now the form opens without
the query being activated first.
 
Deb,

If we use the Form Filter we will not need the query to run prior to the
form opening...

The filter will replace the criteria box that would run before the form opens.

Will this work for this situation?

Chip
 
Sounds great, so where do i start? is the filter made in the form design
view, sorry for ignorance i have never created form filters before - tried to
avoid the hard stuff! thanks alot
 
Cool,
This is really easy!!!

We are going to use the combo-box wizard in Access. If you go to design
view of the form and look at the toolbars it shows. you should see the Form
Formatting toolbar. If not, right-click on the toll bars and select it.

Now look at the icons on each of the buttons of that toolbar. You will see
one that looks like a combo-box (drop-down box) and press that button. Now
go to a blank area on your form and click. The wizard will start.

It should ask you what you want the combo box to do. select "Look up..."

Next, it may ask you to select the Table or Query to to use. (It may assume
the one that is already the data for the form so you may not see this)

Next, select the field you want to include. This will be the field that you
had the parameter on originally. (be sure and remove that parameter from the
query before running this new updated form)

Then choose how you want it sorted.

Then adjust how wide you want the box to be. (you can adjust this again
later on the form)

Now just give it a name. and bingo you are done!!!

now use the combo box to select the record you want to see on the form. you
can also use the combo box by typing in what you want and it will narrow down
the choices as you type. you can also go back and re-select again and again
and again...

Let me know if this works for you...

I love this wizard and use it all the time!!!

Chip





Now,
 
Hey that is fantastic! thank you so much for taking your time to help this
little Kiwi! I did what you said and it works fine, i will be using these
filters more often and they are easy! have a good day
Debbie
 
Back
Top