By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,659 Members | 1,717 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,659 IT Pros & Developers. It's quick & easy.

automatically entered filter criteria

P: n/a
I have designed a database that has several forms. The forms include a
Warranty Registration for and Warranty Claim form. If I were on the warranty
registration form for a particular product, and the serial number of that
product were shown in a text box, I want to be able to click a button and
pull up all the warranty claims on that serial numbered product. I would
also want to be able to enter a claim and then click a button that would take
me to the Warranty registration.

Any help would be appreciated...thanks

Shannan
--
Message posted via http://www.accessmonster.com
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On the Warrenty Registration form create a new button. insert the
following code.

Private Sub MyButtonName_Click()
DoCmd.OpenForm "My Warrent Claims form", acNormal, , "[Serial
Number] = '" & Forms!myregistrationform!serialnumber & "'"
End Sub

You can also do that function with a macro, which would be easier to do
if you have no Visual Basic background.

Nov 13 '05 #2

P: n/a
I should clarify that code.

Private Sub MyButtonName_Click()
DoCmd.OpenForm "<type name of warrenty claim form here>", acNormal,
, "[<type name of text box containing serial number here>] = '" &
Forms!<type name of registration form here>!<type name of text box
containing serial number here> & "'"
End Sub

Nov 13 '05 #3

P: n/a
I tried to do this and it sort of worked. When I was on the registration
form, I clicked the button and it took me to a claim for the same machine.
However, when I closed the claim form and went back to the registration form
to try it for another machine, it just took me to the same claim I had just
pulled up before. Also, on the first try (when it worked) it only took me to
the last claim that was entered for that machine.

I guess what I want it to do is upon the click event of the button, use a
filter to narrow down the claims to the ones that have that serial number
associated with them, and vice versa for the claim form. (i.e. take me to
the machine registration).

Its all about knowing the warranty history for a machine at the click of a
button, and knowing if the machine has been registered, also.

Thanks for your help.

Shannan

An***********@bcbsmn.com wrote:
I should clarify that code.

Private Sub MyButtonName_Click()
DoCmd.OpenForm "<type name of warrenty claim form here>", acNormal,
, "[<type name of text box containing serial number here>] = '" &
Forms!<type name of registration form here>!<type name of text box
containing serial number here> & "'"
End Sub

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200511/1
Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.