473,320 Members | 1,572 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

automatically entered filter criteria

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
3 1189
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: CSDunn | last post by:
Hello, I have a problem with field filtering between an Access 2000 Project form (the application is called CELDT), and the report that shows the results of the filter. Both the form and the...
4
by: Nhmiller | last post by:
This is directly from Access' Help: "About designing a query When you open a query in Design view, or open a form, report, or datasheet and show the Advanced Filter/Sort window (Advanced...
3
by: dhowell | last post by:
In reading some of the posts on this group, it appears as though it is not strait forward at all to filter a form, which has subforms, by criteria which are either on subforms or span more than one...
0
by: neoteny2 | last post by:
I need MS Access to automatically create reports/subreports based on specific criteria. I am building a database in Access 2003 with different locations/sites. I have the "sites" table created...
1
by: lorirobn | last post by:
Hi, I have a report that works just fine. Now I would like to add the capability to choose selection criteria to limit what is displayed. I created several reports that do this, but they used...
1
by: Curtis | last post by:
I am having a problem with the coding below that someone was trying to help me with in another website. I have been to several websites and hopefully here I can get it resolved. I inherited this...
2
by: tjdoss | last post by:
I am trying to display the "Filter by Form" criteria in a Report (that displays the filtered information). I have an unbound textbox with !. as the control source that will give me the Filter itself...
5
by: Ron S | last post by:
After days of searching I finally an example that would work with my application, the only problem is after entering all of the code it is not working. Would someone be kind enough to take a look at...
6
by: jmarcrum | last post by:
Hi! I have created a Union Query in ACCESS 2003, that combines 130 records from one query (Extra Foreman Radios) and 250 records from another query (Forman Main Radios). I have created a...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.