laptop going out of the window soon!!!

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

Guest

I have an access database which is linking through as a front end to sql.
The queries etc., I have done work fine all apart from one.

I have created a form and the query needs to be populated from whatever the
user selects from combo boxes on the form. There are 2 boxes.

My query will work with either of the fields from the form, but not both. -
Using both just gives me access not responding.

I know I've got the query right as if I put one of the values in as a static
value into the query and just let the form populate the other, it works - am
very confused...,

Please help
 
Well, don't throw your laptop out the window, because I doubt that is the
cause of your problem. However, we don't have enough information to go on to
give you a solution. If you will post some more specifics about your tables,
queries, and comboboxes, someone here should be able to help you out.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html
 
My form holds two combo boxes - period and year (both are looking at the same
table) - both boxes are limit to list.

My query has 4 separate tables linked together. If I enter static details
into the query, the query will run successfully, showing me the details I
need. However, I need the user to be able to select via the combo boxes a
period and year (as I have a macro with a report setup) and just click a
button to show a report.

My criteria on my query to populate from the form being...
[Forms]![Periods]![dates]
[Forms]![Periods]![years]

any help would be appreciated - thanks
 
Lynne,
That's a good start. However, we can't see how you have put those 2 criteria
in your query -- i.e. is it an OR or an AND situation. It would help if you
would post the SQL for your query.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html



Lynne said:
My form holds two combo boxes - period and year (both are looking at the
same
table) - both boxes are limit to list.

My query has 4 separate tables linked together. If I enter static details
into the query, the query will run successfully, showing me the details I
need. However, I need the user to be able to select via the combo boxes a
period and year (as I have a macro with a report setup) and just click a
button to show a report.

My criteria on my query to populate from the form being...
[Forms]![Periods]![dates]
[Forms]![Periods]![years]

any help would be appreciated - thanks

Lynn Trapp said:
Well, don't throw your laptop out the window, because I doubt that is the
cause of your problem. However, we don't have enough information to go on
to
give you a solution. If you will post some more specifics about your
tables,
queries, and comboboxes, someone here should be able to help you out.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html
 
Sorry about that.

Sql is as follows:

SELECT scheme_nltranm.trans_period, scheme_nltranm.nlyear,
scheme_nlforcm.nominal_code, scheme_nlaccm.description,
scheme_nltranm.journal_date, scheme_nltranm.journal_number,
scheme_nltranm.journal_desc, scheme_nltranm.journal_amount,
scheme_nlforcm.base_amount01, scheme_nlforcm.base_amount02,
scheme_nlforcm.base_amount03, scheme_nlforcm.base_amount04,
scheme_nlforcm.base_amount05, scheme_nlforcm.base_amount06,
scheme_nlforcm.base_amount07, scheme_nlforcm.base_amount08,
scheme_nlforcm.base_amount09, scheme_nlforcm.base_amount10,
scheme_nlforcm.base_amount11, scheme_nlforcm.base_amount12,
scheme_nlaccm.period_actual01, scheme_nlaccm.period_actual02,
scheme_nlaccm.period_actual03, scheme_nlaccm.period_actual04,
scheme_nlaccm.period_actual05, scheme_nlaccm.period_actual06,
scheme_nlaccm.period_actual07, scheme_nlaccm.period_actual08,
scheme_nlaccm.period_actual09, scheme_nlaccm.period_actual10,
scheme_nlaccm.period_actual11, scheme_nlaccm.period_actual12
FROM (scheme_nlmastm INNER JOIN scheme_nlforcm ON
scheme_nlmastm.nominal_code = scheme_nlforcm.nominal_code) LEFT JOIN
(scheme_nltranm LEFT JOIN scheme_nlaccm ON scheme_nltranm.account_code =
scheme_nlaccm.account_code) ON scheme_nlforcm.nominal_code =
scheme_nltranm.posting_code
WHERE (((scheme_nltranm.trans_period)=[Forms]![Periods works to populate
year part of query plus button works]![dates]) AND
((scheme_nltranm.nlyear)=[Forms]![Periods works to populate year part of
query plus button works]![Years]));


Regards

Lynn Trapp said:
Lynne,
That's a good start. However, we can't see how you have put those 2 criteria
in your query -- i.e. is it an OR or an AND situation. It would help if you
would post the SQL for your query.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html



Lynne said:
My form holds two combo boxes - period and year (both are looking at the
same
table) - both boxes are limit to list.

My query has 4 separate tables linked together. If I enter static details
into the query, the query will run successfully, showing me the details I
need. However, I need the user to be able to select via the combo boxes a
period and year (as I have a macro with a report setup) and just click a
button to show a report.

My criteria on my query to populate from the form being...
[Forms]![Periods]![dates]
[Forms]![Periods]![years]

any help would be appreciated - thanks

Lynn Trapp said:
Well, don't throw your laptop out the window, because I doubt that is the
cause of your problem. However, we don't have enough information to go on
to
give you a solution. If you will post some more specifics about your
tables,
queries, and comboboxes, someone here should be able to help you out.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html



I have an access database which is linking through as a front end to
sql.
The queries etc., I have done work fine all apart from one.

I have created a form and the query needs to be populated from whatever
the
user selects from combo boxes on the form. There are 2 boxes.

My query will work with either of the fields from the form, but not
both. -
Using both just gives me access not responding.

I know I've got the query right as if I put one of the values in as a
static
value into the query and just let the form populate the other, it
works -
am
very confused...,

Please help
 
Lynne,
My first question would by why the [scheme_nlmastm] is in the FROM clause
when it does not appear anywhere in the select list or in the WHERE clause.
I can't see, off hand, why you need that table in your query. Second, are
you certain that you have values that match BOTH the
scheme_nltranm.transperiod AND the scheme_nltranm.nlyear?

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html



Lynne said:
Sorry about that.

Sql is as follows:

SELECT scheme_nltranm.trans_period, scheme_nltranm.nlyear,
scheme_nlforcm.nominal_code, scheme_nlaccm.description,
scheme_nltranm.journal_date, scheme_nltranm.journal_number,
scheme_nltranm.journal_desc, scheme_nltranm.journal_amount,
scheme_nlforcm.base_amount01, scheme_nlforcm.base_amount02,
scheme_nlforcm.base_amount03, scheme_nlforcm.base_amount04,
scheme_nlforcm.base_amount05, scheme_nlforcm.base_amount06,
scheme_nlforcm.base_amount07, scheme_nlforcm.base_amount08,
scheme_nlforcm.base_amount09, scheme_nlforcm.base_amount10,
scheme_nlforcm.base_amount11, scheme_nlforcm.base_amount12,
scheme_nlaccm.period_actual01, scheme_nlaccm.period_actual02,
scheme_nlaccm.period_actual03, scheme_nlaccm.period_actual04,
scheme_nlaccm.period_actual05, scheme_nlaccm.period_actual06,
scheme_nlaccm.period_actual07, scheme_nlaccm.period_actual08,
scheme_nlaccm.period_actual09, scheme_nlaccm.period_actual10,
scheme_nlaccm.period_actual11, scheme_nlaccm.period_actual12
FROM (scheme_nlmastm INNER JOIN scheme_nlforcm ON
scheme_nlmastm.nominal_code = scheme_nlforcm.nominal_code) LEFT JOIN
(scheme_nltranm LEFT JOIN scheme_nlaccm ON scheme_nltranm.account_code =
scheme_nlaccm.account_code) ON scheme_nlforcm.nominal_code =
scheme_nltranm.posting_code
WHERE (((scheme_nltranm.trans_period)=[Forms]![Periods works to populate
year part of query plus button works]![dates]) AND
((scheme_nltranm.nlyear)=[Forms]![Periods works to populate year part of
query plus button works]![Years]));


Regards

Lynn Trapp said:
Lynne,
That's a good start. However, we can't see how you have put those 2
criteria
in your query -- i.e. is it an OR or an AND situation. It would help if
you
would post the SQL for your query.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html



Lynne said:
My form holds two combo boxes - period and year (both are looking at
the
same
table) - both boxes are limit to list.

My query has 4 separate tables linked together. If I enter static
details
into the query, the query will run successfully, showing me the details
I
need. However, I need the user to be able to select via the combo
boxes a
period and year (as I have a macro with a report setup) and just click
a
button to show a report.

My criteria on my query to populate from the form being...
[Forms]![Periods]![dates]
[Forms]![Periods]![years]

any help would be appreciated - thanks

:

Well, don't throw your laptop out the window, because I doubt that is
the
cause of your problem. However, we don't have enough information to go
on
to
give you a solution. If you will post some more specifics about your
tables,
queries, and comboboxes, someone here should be able to help you out.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html



I have an access database which is linking through as a front end to
sql.
The queries etc., I have done work fine all apart from one.

I have created a form and the query needs to be populated from
whatever
the
user selects from combo boxes on the form. There are 2 boxes.

My query will work with either of the fields from the form, but not
both. -
Using both just gives me access not responding.

I know I've got the query right as if I put one of the values in as
a
static
value into the query and just let the form populate the other, it
works -
am
very confused...,

Please help
 
Lynn

There will be other fields coming through from scheme_nlmastm, but I haven't
got round to putting them in yet, as I can't get it to work properly.

I'm sure that I have values which match both transperiod and nlyear.

Lynn Trapp said:
Lynne,
My first question would by why the [scheme_nlmastm] is in the FROM clause
when it does not appear anywhere in the select list or in the WHERE clause.
I can't see, off hand, why you need that table in your query. Second, are
you certain that you have values that match BOTH the
scheme_nltranm.transperiod AND the scheme_nltranm.nlyear?

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html



Lynne said:
Sorry about that.

Sql is as follows:

SELECT scheme_nltranm.trans_period, scheme_nltranm.nlyear,
scheme_nlforcm.nominal_code, scheme_nlaccm.description,
scheme_nltranm.journal_date, scheme_nltranm.journal_number,
scheme_nltranm.journal_desc, scheme_nltranm.journal_amount,
scheme_nlforcm.base_amount01, scheme_nlforcm.base_amount02,
scheme_nlforcm.base_amount03, scheme_nlforcm.base_amount04,
scheme_nlforcm.base_amount05, scheme_nlforcm.base_amount06,
scheme_nlforcm.base_amount07, scheme_nlforcm.base_amount08,
scheme_nlforcm.base_amount09, scheme_nlforcm.base_amount10,
scheme_nlforcm.base_amount11, scheme_nlforcm.base_amount12,
scheme_nlaccm.period_actual01, scheme_nlaccm.period_actual02,
scheme_nlaccm.period_actual03, scheme_nlaccm.period_actual04,
scheme_nlaccm.period_actual05, scheme_nlaccm.period_actual06,
scheme_nlaccm.period_actual07, scheme_nlaccm.period_actual08,
scheme_nlaccm.period_actual09, scheme_nlaccm.period_actual10,
scheme_nlaccm.period_actual11, scheme_nlaccm.period_actual12
FROM (scheme_nlmastm INNER JOIN scheme_nlforcm ON
scheme_nlmastm.nominal_code = scheme_nlforcm.nominal_code) LEFT JOIN
(scheme_nltranm LEFT JOIN scheme_nlaccm ON scheme_nltranm.account_code =
scheme_nlaccm.account_code) ON scheme_nlforcm.nominal_code =
scheme_nltranm.posting_code
WHERE (((scheme_nltranm.trans_period)=[Forms]![Periods works to populate
year part of query plus button works]![dates]) AND
((scheme_nltranm.nlyear)=[Forms]![Periods works to populate year part of
query plus button works]![Years]));


Regards

Lynn Trapp said:
Lynne,
That's a good start. However, we can't see how you have put those 2
criteria
in your query -- i.e. is it an OR or an AND situation. It would help if
you
would post the SQL for your query.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html



My form holds two combo boxes - period and year (both are looking at
the
same
table) - both boxes are limit to list.

My query has 4 separate tables linked together. If I enter static
details
into the query, the query will run successfully, showing me the details
I
need. However, I need the user to be able to select via the combo
boxes a
period and year (as I have a macro with a report setup) and just click
a
button to show a report.

My criteria on my query to populate from the form being...
[Forms]![Periods]![dates]
[Forms]![Periods]![years]

any help would be appreciated - thanks

:

Well, don't throw your laptop out the window, because I doubt that is
the
cause of your problem. However, we don't have enough information to go
on
to
give you a solution. If you will post some more specifics about your
tables,
queries, and comboboxes, someone here should be able to help you out.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html



I have an access database which is linking through as a front end to
sql.
The queries etc., I have done work fine all apart from one.

I have created a form and the query needs to be populated from
whatever
the
user selects from combo boxes on the form. There are 2 boxes.

My query will work with either of the fields from the form, but not
both. -
Using both just gives me access not responding.

I know I've got the query right as if I put one of the values in as
a
static
value into the query and just let the form populate the other, it
works -
am
very confused...,

Please help
 
Lynne,
Let me suggest that you start by removing that table and seeing if the query
works without it. If it still doesn't, then pare the query down to the bare
bones to see if you can get it to work.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html



Lynne said:
Lynn

There will be other fields coming through from scheme_nlmastm, but I
haven't
got round to putting them in yet, as I can't get it to work properly.

I'm sure that I have values which match both transperiod and nlyear.

Lynn Trapp said:
Lynne,
My first question would by why the [scheme_nlmastm] is in the FROM clause
when it does not appear anywhere in the select list or in the WHERE
clause.
I can't see, off hand, why you need that table in your query. Second, are
you certain that you have values that match BOTH the
scheme_nltranm.transperiod AND the scheme_nltranm.nlyear?

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html



Lynne said:
Sorry about that.

Sql is as follows:

SELECT scheme_nltranm.trans_period, scheme_nltranm.nlyear,
scheme_nlforcm.nominal_code, scheme_nlaccm.description,
scheme_nltranm.journal_date, scheme_nltranm.journal_number,
scheme_nltranm.journal_desc, scheme_nltranm.journal_amount,
scheme_nlforcm.base_amount01, scheme_nlforcm.base_amount02,
scheme_nlforcm.base_amount03, scheme_nlforcm.base_amount04,
scheme_nlforcm.base_amount05, scheme_nlforcm.base_amount06,
scheme_nlforcm.base_amount07, scheme_nlforcm.base_amount08,
scheme_nlforcm.base_amount09, scheme_nlforcm.base_amount10,
scheme_nlforcm.base_amount11, scheme_nlforcm.base_amount12,
scheme_nlaccm.period_actual01, scheme_nlaccm.period_actual02,
scheme_nlaccm.period_actual03, scheme_nlaccm.period_actual04,
scheme_nlaccm.period_actual05, scheme_nlaccm.period_actual06,
scheme_nlaccm.period_actual07, scheme_nlaccm.period_actual08,
scheme_nlaccm.period_actual09, scheme_nlaccm.period_actual10,
scheme_nlaccm.period_actual11, scheme_nlaccm.period_actual12
FROM (scheme_nlmastm INNER JOIN scheme_nlforcm ON
scheme_nlmastm.nominal_code = scheme_nlforcm.nominal_code) LEFT JOIN
(scheme_nltranm LEFT JOIN scheme_nlaccm ON scheme_nltranm.account_code
=
scheme_nlaccm.account_code) ON scheme_nlforcm.nominal_code =
scheme_nltranm.posting_code
WHERE (((scheme_nltranm.trans_period)=[Forms]![Periods works to
populate
year part of query plus button works]![dates]) AND
((scheme_nltranm.nlyear)=[Forms]![Periods works to populate year part
of
query plus button works]![Years]));


Regards

:

Lynne,
That's a good start. However, we can't see how you have put those 2
criteria
in your query -- i.e. is it an OR or an AND situation. It would help
if
you
would post the SQL for your query.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html



My form holds two combo boxes - period and year (both are looking at
the
same
table) - both boxes are limit to list.

My query has 4 separate tables linked together. If I enter static
details
into the query, the query will run successfully, showing me the
details
I
need. However, I need the user to be able to select via the combo
boxes a
period and year (as I have a macro with a report setup) and just
click
a
button to show a report.

My criteria on my query to populate from the form being...
[Forms]![Periods]![dates]
[Forms]![Periods]![years]

any help would be appreciated - thanks

:

Well, don't throw your laptop out the window, because I doubt that
is
the
cause of your problem. However, we don't have enough information to
go
on
to
give you a solution. If you will post some more specifics about
your
tables,
queries, and comboboxes, someone here should be able to help you
out.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html



I have an access database which is linking through as a front end
to
sql.
The queries etc., I have done work fine all apart from one.

I have created a form and the query needs to be populated from
whatever
the
user selects from combo boxes on the form. There are 2 boxes.

My query will work with either of the fields from the form, but
not
both. -
Using both just gives me access not responding.

I know I've got the query right as if I put one of the values in
as
a
static
value into the query and just let the form populate the other, it
works -
am
very confused...,

Please help
 
Thanks ever so much for that Lynn, You're a Star - it's now working!

Lynn Trapp said:
Lynne,
Let me suggest that you start by removing that table and seeing if the query
works without it. If it still doesn't, then pare the query down to the bare
bones to see if you can get it to work.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html



Lynne said:
Lynn

There will be other fields coming through from scheme_nlmastm, but I
haven't
got round to putting them in yet, as I can't get it to work properly.

I'm sure that I have values which match both transperiod and nlyear.

Lynn Trapp said:
Lynne,
My first question would by why the [scheme_nlmastm] is in the FROM clause
when it does not appear anywhere in the select list or in the WHERE
clause.
I can't see, off hand, why you need that table in your query. Second, are
you certain that you have values that match BOTH the
scheme_nltranm.transperiod AND the scheme_nltranm.nlyear?

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html



Sorry about that.

Sql is as follows:

SELECT scheme_nltranm.trans_period, scheme_nltranm.nlyear,
scheme_nlforcm.nominal_code, scheme_nlaccm.description,
scheme_nltranm.journal_date, scheme_nltranm.journal_number,
scheme_nltranm.journal_desc, scheme_nltranm.journal_amount,
scheme_nlforcm.base_amount01, scheme_nlforcm.base_amount02,
scheme_nlforcm.base_amount03, scheme_nlforcm.base_amount04,
scheme_nlforcm.base_amount05, scheme_nlforcm.base_amount06,
scheme_nlforcm.base_amount07, scheme_nlforcm.base_amount08,
scheme_nlforcm.base_amount09, scheme_nlforcm.base_amount10,
scheme_nlforcm.base_amount11, scheme_nlforcm.base_amount12,
scheme_nlaccm.period_actual01, scheme_nlaccm.period_actual02,
scheme_nlaccm.period_actual03, scheme_nlaccm.period_actual04,
scheme_nlaccm.period_actual05, scheme_nlaccm.period_actual06,
scheme_nlaccm.period_actual07, scheme_nlaccm.period_actual08,
scheme_nlaccm.period_actual09, scheme_nlaccm.period_actual10,
scheme_nlaccm.period_actual11, scheme_nlaccm.period_actual12
FROM (scheme_nlmastm INNER JOIN scheme_nlforcm ON
scheme_nlmastm.nominal_code = scheme_nlforcm.nominal_code) LEFT JOIN
(scheme_nltranm LEFT JOIN scheme_nlaccm ON scheme_nltranm.account_code
=
scheme_nlaccm.account_code) ON scheme_nlforcm.nominal_code =
scheme_nltranm.posting_code
WHERE (((scheme_nltranm.trans_period)=[Forms]![Periods works to
populate
year part of query plus button works]![dates]) AND
((scheme_nltranm.nlyear)=[Forms]![Periods works to populate year part
of
query plus button works]![Years]));


Regards

:

Lynne,
That's a good start. However, we can't see how you have put those 2
criteria
in your query -- i.e. is it an OR or an AND situation. It would help
if
you
would post the SQL for your query.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html



My form holds two combo boxes - period and year (both are looking at
the
same
table) - both boxes are limit to list.

My query has 4 separate tables linked together. If I enter static
details
into the query, the query will run successfully, showing me the
details
I
need. However, I need the user to be able to select via the combo
boxes a
period and year (as I have a macro with a report setup) and just
click
a
button to show a report.

My criteria on my query to populate from the form being...
[Forms]![Periods]![dates]
[Forms]![Periods]![years]

any help would be appreciated - thanks

:

Well, don't throw your laptop out the window, because I doubt that
is
the
cause of your problem. However, we don't have enough information to
go
on
to
give you a solution. If you will post some more specifics about
your
tables,
queries, and comboboxes, someone here should be able to help you
out.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html



I have an access database which is linking through as a front end
to
sql.
The queries etc., I have done work fine all apart from one.

I have created a form and the query needs to be populated from
whatever
the
user selects from combo boxes on the form. There are 2 boxes.

My query will work with either of the fields from the form, but
not
both. -
Using both just gives me access not responding.

I know I've got the query right as if I put one of the values in
as
a
static
value into the query and just let the form populate the other, it
works -
am
very confused...,

Please help
 
Awesome! I'm glad you got it working.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html



Lynne said:
Thanks ever so much for that Lynn, You're a Star - it's now working!

Lynn Trapp said:
Lynne,
Let me suggest that you start by removing that table and seeing if the
query
works without it. If it still doesn't, then pare the query down to the
bare
bones to see if you can get it to work.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html



Lynne said:
Lynn

There will be other fields coming through from scheme_nlmastm, but I
haven't
got round to putting them in yet, as I can't get it to work properly.

I'm sure that I have values which match both transperiod and nlyear.

:

Lynne,
My first question would by why the [scheme_nlmastm] is in the FROM
clause
when it does not appear anywhere in the select list or in the WHERE
clause.
I can't see, off hand, why you need that table in your query. Second,
are
you certain that you have values that match BOTH the
scheme_nltranm.transperiod AND the scheme_nltranm.nlyear?

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html



Sorry about that.

Sql is as follows:

SELECT scheme_nltranm.trans_period, scheme_nltranm.nlyear,
scheme_nlforcm.nominal_code, scheme_nlaccm.description,
scheme_nltranm.journal_date, scheme_nltranm.journal_number,
scheme_nltranm.journal_desc, scheme_nltranm.journal_amount,
scheme_nlforcm.base_amount01, scheme_nlforcm.base_amount02,
scheme_nlforcm.base_amount03, scheme_nlforcm.base_amount04,
scheme_nlforcm.base_amount05, scheme_nlforcm.base_amount06,
scheme_nlforcm.base_amount07, scheme_nlforcm.base_amount08,
scheme_nlforcm.base_amount09, scheme_nlforcm.base_amount10,
scheme_nlforcm.base_amount11, scheme_nlforcm.base_amount12,
scheme_nlaccm.period_actual01, scheme_nlaccm.period_actual02,
scheme_nlaccm.period_actual03, scheme_nlaccm.period_actual04,
scheme_nlaccm.period_actual05, scheme_nlaccm.period_actual06,
scheme_nlaccm.period_actual07, scheme_nlaccm.period_actual08,
scheme_nlaccm.period_actual09, scheme_nlaccm.period_actual10,
scheme_nlaccm.period_actual11, scheme_nlaccm.period_actual12
FROM (scheme_nlmastm INNER JOIN scheme_nlforcm ON
scheme_nlmastm.nominal_code = scheme_nlforcm.nominal_code) LEFT JOIN
(scheme_nltranm LEFT JOIN scheme_nlaccm ON
scheme_nltranm.account_code
=
scheme_nlaccm.account_code) ON scheme_nlforcm.nominal_code =
scheme_nltranm.posting_code
WHERE (((scheme_nltranm.trans_period)=[Forms]![Periods works to
populate
year part of query plus button works]![dates]) AND
((scheme_nltranm.nlyear)=[Forms]![Periods works to populate year
part
of
query plus button works]![Years]));


Regards

:

Lynne,
That's a good start. However, we can't see how you have put those 2
criteria
in your query -- i.e. is it an OR or an AND situation. It would
help
if
you
would post the SQL for your query.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html



My form holds two combo boxes - period and year (both are looking
at
the
same
table) - both boxes are limit to list.

My query has 4 separate tables linked together. If I enter
static
details
into the query, the query will run successfully, showing me the
details
I
need. However, I need the user to be able to select via the
combo
boxes a
period and year (as I have a macro with a report setup) and just
click
a
button to show a report.

My criteria on my query to populate from the form being...
[Forms]![Periods]![dates]
[Forms]![Periods]![years]

any help would be appreciated - thanks

:

Well, don't throw your laptop out the window, because I doubt
that
is
the
cause of your problem. However, we don't have enough information
to
go
on
to
give you a solution. If you will post some more specifics about
your
tables,
queries, and comboboxes, someone here should be able to help you
out.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html



I have an access database which is linking through as a front
end
to
sql.
The queries etc., I have done work fine all apart from one.

I have created a form and the query needs to be populated from
whatever
the
user selects from combo boxes on the form. There are 2 boxes.

My query will work with either of the fields from the form,
but
not
both. -
Using both just gives me access not responding.

I know I've got the query right as if I put one of the values
in
as
a
static
value into the query and just let the form populate the other,
it
works -
am
very confused...,

Please help
 
Back
Top