Group:  Microsoft Access » microsoft.public.access.formscoding
Thread: HOW CAN I MAKE A PARAMETER QUERY RUN AGAIN ON A FORM?

Geek News

HOW CAN I MAKE A PARAMETER QUERY RUN AGAIN ON A FORM?
thedrumdoctor 11/10/2008 1:07:01 PM
I have a form which starts with a parameter query on a combo box and finishes
with an ‘Add New Record’ button.

The parameter query asks for a text phrase and returns options that match
text inputted. These results appear in the combo box list.

An item can then be chosen from the list after which, other criteria on the
form can be completed. The last stop on the form is the ‘Add New Record’
command button. Once this is pressed the record is added to my table and I go
back to the start of the form.

*PROBLEM*

How can I make the parameter query run again at the start of the form? I
have tried using a ‘Refresh Form Data’ command button but this seems to mess
up data entered on previous records. Is there an extra event I can add to the
‘Add New Record’ button?

Re: HOW CAN I MAKE A PARAMETER QUERY RUN AGAIN ON A FORM?
"Roger Carlson" <RogerCarlson[ at ]noemail.noemail> 11/10/2008 2:02:48 PM
Try
DoCmd.Requery


--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L


"thedrumdoctor" <thedrumdoctor[ at ]discussions.microsoft.com> wrote in message
news:DDA9C122-78FD-4B04-ABC3-4CCAF37131A9[ at ]microsoft.com...
[Quoted Text]
>I have a form which starts with a parameter query on a combo box and
>finishes
> with an 'Add New Record' button.
>
> The parameter query asks for a text phrase and returns options that match
> text inputted. These results appear in the combo box list.
>
> An item can then be chosen from the list after which, other criteria on
> the
> form can be completed. The last stop on the form is the 'Add New Record'
> command button. Once this is pressed the record is added to my table and I
> go
> back to the start of the form.
>
> *PROBLEM*
>
> How can I make the parameter query run again at the start of the form? I
> have tried using a 'Refresh Form Data' command button but this seems to
> mess
> up data entered on previous records. Is there an extra event I can add to
> the
> 'Add New Record' button?
>


Re: HOW CAN I MAKE A PARAMETER QUERY RUN AGAIN ON A FORM?
thedrumdoctor 11/11/2008 11:00:03 AM
Thanks, that did do what I needed but it has also thrown up other
discrepancies in my methodology which makes me realise, that it's one thing
building simple relational databases, but if you want to make them do
anything extra then a course in VBA and Access development is an absolute
must.

"Roger Carlson" wrote:

[Quoted Text]
> Try
> DoCmd.Requery
>
>
> --
> --Roger Carlson
> MS Access MVP
> Access Database Samples: www.rogersaccesslibrary.com
> Want answers to your Access questions in your Email?
> Free subscription:
> http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
>
>
> "thedrumdoctor" <thedrumdoctor[ at ]discussions.microsoft.com> wrote in message
> news:DDA9C122-78FD-4B04-ABC3-4CCAF37131A9[ at ]microsoft.com...
> >I have a form which starts with a parameter query on a combo box and
> >finishes
> > with an 'Add New Record' button.
> >
> > The parameter query asks for a text phrase and returns options that match
> > text inputted. These results appear in the combo box list.
> >
> > An item can then be chosen from the list after which, other criteria on
> > the
> > form can be completed. The last stop on the form is the 'Add New Record'
> > command button. Once this is pressed the record is added to my table and I
> > go
> > back to the start of the form.
> >
> > *PROBLEM*
> >
> > How can I make the parameter query run again at the start of the form? I
> > have tried using a 'Refresh Form Data' command button but this seems to
> > mess
> > up data entered on previous records. Is there an extra event I can add to
> > the
> > 'Add New Record' button?
> >
>
>
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net