How can I?

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

Guest

Hi!

How can I to personalize the the form's heading bar that it appears when we
run one query conditional to ask for a choice option, please?

Thanks in advance.
an
 
Hi,



You open a form (that you design) that will ask for the parameters and on
the OK button click event, launch the query that will refer to the form
controls.


So, basically, you do the reverse of what you see: what you usually do is
to launch the query and get a form, but now, you will launch the form, and
next, launch the query.



Hoping it may help,
Vanderghast, Access MVP
 
MW,

Thanks for your reply.
Pardon but I did not understand the “mechanicsâ€â€¦
Thanks more one time!

And now: Portugal-England...
an
 
Hi,


In Nothwind, have a new form, AskCategory, with one combo box with all the
possible categories (bind its row source to the table Categories, have its
pk remembered, which the wizard will do by default). Also add a button to
this form with the code:

-------------------------------------
Option Compare Database
Option Explicit

Private Sub Command2_Click()
If (Not IsNull(Forms!AskCategory!Combo0)) Then
DoCmd.RunSQL "UPDATE products SET unitPrice = unitPrice * 1.00 WHERE
CategoryID=FORMS!AskCategory!Combo0"
End If
End Sub
---------------------------------------


Save the form AskCategory. Now, open it, select a category, and click the OK
button. The form AskCategory acts like a "custom" form asking for
parameters and the query runs once the user click the ok button.



Hoping it may help,
Vanderghast, Access MVP
 
MW,

Thank you for your idea.
an

Michel Walsh said:
Hi,


In Nothwind, have a new form, AskCategory, with one combo box with all the
possible categories (bind its row source to the table Categories, have its
pk remembered, which the wizard will do by default). Also add a button to
this form with the code:

-------------------------------------
Option Compare Database
Option Explicit

Private Sub Command2_Click()
If (Not IsNull(Forms!AskCategory!Combo0)) Then
DoCmd.RunSQL "UPDATE products SET unitPrice = unitPrice * 1.00 WHERE
CategoryID=FORMS!AskCategory!Combo0"
End If
End Sub
---------------------------------------


Save the form AskCategory. Now, open it, select a category, and click the OK
button. The form AskCategory acts like a "custom" form asking for
parameters and the query runs once the user click the ok button.



Hoping it may help,
Vanderghast, Access MVP
 
Ooops!
Sorry.

I maded download of Nwind.exe, uncompressed file and in db does not consist
("new file") AskCategory… (?)
Only Categories.

Thanks.
an
 
Back
Top