urgent query help (1 Viewer)

janed

Registered User.
Local time
Today, 21:49
Joined
Feb 6, 2002
Messages
60
i want to make a query that asks me two questions at once. if for example it asks me for a first name and a second name and i enter both then i want it to sow ALL fields that contain those names. however, i want it to ask me these questions at once, not as two seperate parameter boxes. pls help
 

janed

Registered User.
Local time
Today, 21:49
Joined
Feb 6, 2002
Messages
60
yes but these are only examples. i am actually looking for a room number and a port number. i was also wondering if anyone knew how to put two reports on the one page.
 

adz2013

Registered User.
Local time
Today, 21:49
Joined
Dec 13, 2001
Messages
64
As far as the query I would make a unbound form and enter the port # and room # on the form and have the query run off of the form. In the criteria of the query type Forms![Formname]![controlname]. That should work. You will need to put this in both fields in the query in the criteria.

HTH
 

janed

Registered User.
Local time
Today, 21:49
Joined
Feb 6, 2002
Messages
60
thank you. i actually have just done that and its working reasonably well! now my next proble is that i need an old port number and a new port number which will require two different queries. i was wondering if i could put them in the same report.
 

adz2013

Registered User.
Local time
Today, 21:49
Joined
Dec 13, 2001
Messages
64
can you explain a little more? I don't fully understand.
 

janed

Registered User.
Local time
Today, 21:49
Joined
Feb 6, 2002
Messages
60
in my main table i have a field for port number and a field for room number, it is sometimes the case that people move room or port. i need a query to ask me for the room number and the port number and to give me a report on that(i have this done) but i then need it to ask me again, say for a new room number, and i need a report on that too. but i want to put these two reports on the one page.
 

directormac

Occasional Presence
Local time
Today, 21:49
Joined
Oct 24, 2001
Messages
259
Two subreports, side by side, each 1/2 the width of the main report.

--Columned Mac
 

janed

Registered User.
Local time
Today, 21:49
Joined
Feb 6, 2002
Messages
60
if i use a sub report for each one is the main report effectively blank?
as i said i have a dialog box that asks for the room number and port number and gives me a report. however now it is giving me a report with no values, only field names. any ideas why?
 

directormac

Occasional Presence
Local time
Today, 21:49
Joined
Oct 24, 2001
Messages
259
Let's back up a second... How are the old port number and new port number stored? What is this report showing you? In other words, I'm looking for some more info on your table structures... You said you had "a field for port number and a field for room number", are those fields part of a larger record structure, such as the user's info? Maybe easiest just to e-mail me your .mdb file if it's not too large...

--Fuzzy Mac

[This message has been edited by directormac (edited 02-13-2002).]
 

janed

Registered User.
Local time
Today, 21:49
Joined
Feb 6, 2002
Messages
60
the fields are part of a table containing other information.
 

directormac

Occasional Presence
Local time
Today, 21:49
Joined
Oct 24, 2001
Messages
259
Are "old port" and "new port" separate fields? Or do you replace "old port" with "new port" in a single "PortID" field? Are the values stored in this/these fields linked to a separate "ports" table?

What's the focus of the two reports, are they about the rooms, the ports, or the user? I'm guessing it's something like:

USER: xxx

OLD PORT NEW PORT
-------- --------
Port # Port #
Room 1 Room 2

Is that what you want?

[This message has been edited by directormac (edited 02-13-2002).]

[This message has been edited by directormac (edited 02-13-2002).]
 

directormac

Occasional Presence
Local time
Today, 21:49
Joined
Oct 24, 2001
Messages
259
Well, without further clarification on what you're facing, I'd guess that at some point you've got a form open that will allow you to capture both the old port ID and the new port ID in text fields. At that point you can create a new query with critera like "(PortID = Forms!ThatForm!txtOldPort) OR (PortID = Forms!ThatForm!txtNewPort)" and print them in a 2-column subreport/subform, or you can have two side-by-side subreports/subforms which are driven by the boxes separately. There's almost certainly a better way... Rich or Pat or one of the other AccessGods may know (they may have even mailed you off-list already, since you mentioned it was urgent). I hope you got it working.

--Chagrined Mac
 

Users who are viewing this thread

Top Bottom