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

another query question

P: n/a
It does not look like my message is posting....if this is a 2nd or 3rd
message, please forgive me as I really don't know how this site works.

I want to apologize ahead of time for being a novice with MS Access
and VBA. I desperately need help with 2 queries that I am trying to
put together. I want to thank anyone that can help me out with this
situation.

I want to put a select query(Query1) that uses one table and the
criteria would be [Enter the Event Number]. When an event number is
entered it will give me the Event Number, Event Name, Event Date,
Event time, and House Size. Next, I need to create a 2nd
query(Query2) that pulls up the records from another table by the
Event Number.

Below are the tables and fields that I am using in both queries

The table that stores the events is called tblEvents contains these
fields: RecordNumber, EventNumber, EventName, EventDate, EventTime,
HouseSize, HouseLocation, the following are all Yes/No fields within
this table: Concessions, CrownClub, Sort, and Rotation. This table is
used in Query1

I have a table that stores job codes and contains the following fields
RecordNumber, JobCode, and JobCodeDescription. From this table I only
pull the JobCodeDescription using the job code field. This table will
be used in Query2.

The table that contains the volunteer information is called
tblVolunteers has RecordNumber, VolunteerNumber, FirstName, LastName,
Address1, Address2, City, State, Zip, HomeTel, BusTel, CellTel,
EmailAddr, EmergencyContactNm, EmergencyContactTel and StatusCode,
actually the tblVolunteer finds only the first name and last name of
the volunteer using the VolunteerNumber. This will be used in Query2

I have another table that would be involved and it's called
tblWorkHours which contains the following fields: RecordNumber,
VolunteerNumber, JobCode, EventNumber, TimeIn, TimeOut and
DateWorked. This is the primary table in Query2...this is where I get
my EventNumber from....there are many records in this table with the
same Event Number. This table will be used in Query2.

Doris

Apr 25 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Doris wrote:
It does not look like my message is posting....if this is a 2nd or 3rd
message, please forgive me as I really don't know how this site works.

I want to apologize ahead of time for being a novice with MS Access
and VBA. I desperately need help with 2 queries that I am trying to
put together. I want to thank anyone that can help me out with this
situation.

I want to put a select query(Query1) that uses one table and the
criteria would be [Enter the Event Number]. When an event number is
entered it will give me the Event Number, Event Name, Event Date,
Event time, and House Size. Next, I need to create a 2nd
query(Query2) that pulls up the records from another table by the
Event Number.

Below are the tables and fields that I am using in both queries

The table that stores the events is called tblEvents contains these
fields: RecordNumber, EventNumber, EventName, EventDate, EventTime,
HouseSize, HouseLocation, the following are all Yes/No fields within
this table: Concessions, CrownClub, Sort, and Rotation. This table is
used in Query1

I have a table that stores job codes and contains the following fields
RecordNumber, JobCode, and JobCodeDescription. From this table I only
pull the JobCodeDescription using the job code field. This table will
be used in Query2.

The table that contains the volunteer information is called
tblVolunteers has RecordNumber, VolunteerNumber, FirstName, LastName,
Address1, Address2, City, State, Zip, HomeTel, BusTel, CellTel,
EmailAddr, EmergencyContactNm, EmergencyContactTel and StatusCode,
actually the tblVolunteer finds only the first name and last name of
the volunteer using the VolunteerNumber. This will be used in Query2

I have another table that would be involved and it's called
tblWorkHours which contains the following fields: RecordNumber,
VolunteerNumber, JobCode, EventNumber, TimeIn, TimeOut and
DateWorked. This is the primary table in Query2...this is where I get
my EventNumber from....there are many records in this table with the
same Event Number. This table will be used in Query2.

Doris
Hi Doris:

What exactly do you need? It appears you have created the queries. Or
are you having a hard time in creating the queries? You describe a
situation but I don't know if you are stating what you have or if you
need help on how to create the queries.

I don't even know if you need the event in Query1 to be the event id
used in query2...IOW are they two separate queries or is query2
dependent on the event in query1?

Apr 26 '07 #2

P: n/a
On 25 Apr 2007 09:37:16 -0700, Doris <Do*****@aol.comwrote:
>It does not look like my message is posting....if this is a 2nd or 3rd
message, please forgive me as I really don't know how this site works.

I want to apologize ahead of time for being a novice with MS Access
and VBA. I desperately need help with 2 queries that I am trying to
put together. I want to thank anyone that can help me out with this
situation.

I want to put a select query(Query1) that uses one table and the
criteria would be [Enter the Event Number]. When an event number is
entered it will give me the Event Number, Event Name, Event Date,
Event time, and House Size. Next, I need to create a 2nd
query(Query2) that pulls up the records from another table by the
Event Number.

Below are the tables and fields that I am using in both queries

The table that stores the events is called tblEvents contains these
fields: RecordNumber, EventNumber, EventName, EventDate, EventTime,
HouseSize, HouseLocation, the following are all Yes/No fields within
this table: Concessions, CrownClub, Sort, and Rotation. This table is
used in Query1

I have a table that stores job codes and contains the following fields
RecordNumber, JobCode, and JobCodeDescription. From this table I only
pull the JobCodeDescription using the job code field. This table will
be used in Query2.

The table that contains the volunteer information is called
tblVolunteers has RecordNumber, VolunteerNumber, FirstName, LastName,
Address1, Address2, City, State, Zip, HomeTel, BusTel, CellTel,
EmailAddr, EmergencyContactNm, EmergencyContactTel and StatusCode,
actually the tblVolunteer finds only the first name and last name of
the volunteer using the VolunteerNumber. This will be used in Query2

I have another table that would be involved and it's called
tblWorkHours which contains the following fields: RecordNumber,
VolunteerNumber, JobCode, EventNumber, TimeIn, TimeOut and
DateWorked. This is the primary table in Query2...this is where I get
my EventNumber from....there are many records in this table with the
same Event Number. This table will be used in Query2.

Doris
Do relationships exist between tables?

Chuck
--
Apr 26 '07 #3

P: n/a
Jay
Doris,

It's not clear from your original post exactly what you need so if I've
misunderstood please forgive me.

Your 1st query needs to be a parameter query as you want it to return
the record(s) based on user-input. Simply create the select query as
normal, by dragging the fields required to adjacent columns in the QBE
grid, then type [Enter the Event Number] in the 'criteria' row of the
EventNumber column. This will cause an automatic dialog box when the
query is run. The dialog box will display the text from within the
square brackets and prompt for the user input.

As for your 2nd query, you've not really said what you need it to do.
You have referred to the following tables:

tblVolunteers
tblWorkHours

Are these the only tables with fields you need returning in your query?

Please post what you need your query to do and I will try to help.
Doris wrote:
It does not look like my message is posting....if this is a 2nd or 3rd
message, please forgive me as I really don't know how this site works.

I want to apologize ahead of time for being a novice with MS Access
and VBA. I desperately need help with 2 queries that I am trying to
put together. I want to thank anyone that can help me out with this
situation.

I want to put a select query(Query1) that uses one table and the
criteria would be [Enter the Event Number]. When an event number is
entered it will give me the Event Number, Event Name, Event Date,
Event time, and House Size. Next, I need to create a 2nd
query(Query2) that pulls up the records from another table by the
Event Number.

Below are the tables and fields that I am using in both queries

The table that stores the events is called tblEvents contains these
fields: RecordNumber, EventNumber, EventName, EventDate, EventTime,
HouseSize, HouseLocation, the following are all Yes/No fields within
this table: Concessions, CrownClub, Sort, and Rotation. This table is
used in Query1

I have a table that stores job codes and contains the following fields
RecordNumber, JobCode, and JobCodeDescription. From this table I only
pull the JobCodeDescription using the job code field. This table will
be used in Query2.

The table that contains the volunteer information is called
tblVolunteers has RecordNumber, VolunteerNumber, FirstName, LastName,
Address1, Address2, City, State, Zip, HomeTel, BusTel, CellTel,
EmailAddr, EmergencyContactNm, EmergencyContactTel and StatusCode,
actually the tblVolunteer finds only the first name and last name of
the volunteer using the VolunteerNumber. This will be used in Query2

I have another table that would be involved and it's called
tblWorkHours which contains the following fields: RecordNumber,
VolunteerNumber, JobCode, EventNumber, TimeIn, TimeOut and
DateWorked. This is the primary table in Query2...this is where I get
my EventNumber from....there are many records in this table with the
same Event Number. This table will be used in Query2.

Doris
Apr 27 '07 #4

P: n/a
Jay
Doris,

I just noticed your earlier post from the 18th, from which it appears my
advice re the parameter query may be redundand :-)

Is this what you're trying to do: -

Use the EventNumber field entered into the parameter select query to
return fields from tblVolunteers and tblWorkHours to give you
information related to the 26 job types - effectively giving you a kind
of staff manifest for a particular event.

If so, from the info you've given you'd need to create a new query and
in the QBE grid add your first parameter query, tblVolunteers and
tblWorkHours. Then link the EventNumber field in the first query to the
EventNumber field in tblWorkHours (just click and drag from one to the
other to set the link). Then link the VolunteerNumber field in
tblVolunteers to the same field in tblWorkHours (again by simply
clicking one and dragging one to the other). If you've created the
links correctly a line will appear between the selected fields in each
table.

You can now just drag & drop the fields needed to the QBE grid columns.
You can select fields from either of the tables or the source query.

Although by using a the parameter field you may have to re-input the
event number, even if the source query is open. If this is the correct
scenario if you let me know and we can address that

Jay wrote:
Doris,

It's not clear from your original post exactly what you need so if I've
misunderstood please forgive me.

Your 1st query needs to be a parameter query as you want it to return
the record(s) based on user-input. Simply create the select query as
normal, by dragging the fields required to adjacent columns in the QBE
grid, then type [Enter the Event Number] in the 'criteria' row of the
EventNumber column. This will cause an automatic dialog box when the
query is run. The dialog box will display the text from within the
square brackets and prompt for the user input.

As for your 2nd query, you've not really said what you need it to do.
You have referred to the following tables:

tblVolunteers
tblWorkHours

Are these the only tables with fields you need returning in your query?

Please post what you need your query to do and I will try to help.
Doris wrote:
>It does not look like my message is posting....if this is a 2nd or 3rd
message, please forgive me as I really don't know how this site works.

I want to apologize ahead of time for being a novice with MS Access
and VBA. I desperately need help with 2 queries that I am trying to
put together. I want to thank anyone that can help me out with this
situation.

I want to put a select query(Query1) that uses one table and the
criteria would be [Enter the Event Number]. When an event number is
entered it will give me the Event Number, Event Name, Event Date,
Event time, and House Size. Next, I need to create a 2nd
query(Query2) that pulls up the records from another table by the
Event Number.

Below are the tables and fields that I am using in both queries

The table that stores the events is called tblEvents contains these
fields: RecordNumber, EventNumber, EventName, EventDate, EventTime,
HouseSize, HouseLocation, the following are all Yes/No fields within
this table: Concessions, CrownClub, Sort, and Rotation. This table is
used in Query1

I have a table that stores job codes and contains the following fields
RecordNumber, JobCode, and JobCodeDescription. From this table I only
pull the JobCodeDescription using the job code field. This table will
be used in Query2.

The table that contains the volunteer information is called
tblVolunteers has RecordNumber, VolunteerNumber, FirstName, LastName,
Address1, Address2, City, State, Zip, HomeTel, BusTel, CellTel,
EmailAddr, EmergencyContactNm, EmergencyContactTel and StatusCode,
actually the tblVolunteer finds only the first name and last name of
the volunteer using the VolunteerNumber. This will be used in Query2

I have another table that would be involved and it's called
tblWorkHours which contains the following fields: RecordNumber,
VolunteerNumber, JobCode, EventNumber, TimeIn, TimeOut and
DateWorked. This is the primary table in Query2...this is where I get
my EventNumber from....there are many records in this table with the
same Event Number. This table will be used in Query2.

Doris
Apr 27 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.