Re: access 2003
- From: "Geoff" <geoff@xxxxxxxxxx>
- Date: Fri, 28 Jul 2006 20:07:57 +0100
Here are my comments.
You may want to experiment with Section 2 below first.
-------------------------------------------------------------SECTION 1:
I removed the parameters from the form query source. Removed both combo
boxes from the form header, events, code, etc and ran the form query
source and it worked fine. I opend the form in form view and it produced
records in the detail section just like a continuous form should.
Obviously,
it did not synchronize combo boxes to the detail section or the parameter
form query source because I had removed these items.
Q1: At this first stage in your experiment, how many records did the
Detail Section list?
(The number of records displayed in the Detail Section will be shown in the
Record Navigation buttons at the bottom of the form.)
I placed the combo boxes back on the form header and the form stopped
working like a continuous form even though the properties of the form
indicated continuous.
Q2: At this second stage in your experiment, how many records did the
Detail Section list?
(Again, look at the Record Navigation buttons.)
Q3: At this second stage, was the Detail Section in Single Form view?
I repeated your experiment. The form did not stop displaying in Continuous
Forms view.
The answers to the above questions may throw some light on the problem.
-------------------------------------------------------------SECTION 2:
I also believe there is a problem with the parameter in at least one of
the forms queries and the SQL because syntax of the SQL will change
randomly. What I mean is the form works and still produces the same
problem we have been discussing but an additional error message shows
up indicating that a syntax problem exist. If you look at the design view
of the query things look ok but if you flip over to SQL view you notice
that additional brackets have been placed around "forms" and
"ChooseCust" in the PARAMETERS LINE OF THE SQL VIEW.
Remove the extra brackets and the query runs with no error
message. Specifically, the query with the parameters that start off
"LIKE nz" which is the parameter placed in the query row source of the
combo box ChooseJob.
(1) Query "qlbJobByCustomer_frmInvoice"
As you know, you are referring to the query "qlbJobByCustomer_frmInvoice".
This query acts as the Row Source for the ChooseJob combo box and contains
the criterion:
Like Nz([Forms]![frmInvoiceSelect]![ChooseCust],"*")
When you view this query in SQL view, it should NOT have a Parameters
clause. It does not need a Parameters clause because you are not opening
this query from VBA code; this query is opened by the ChooseJob combo box
when the "frmInvoiceSelect" form opens. Therefore, I think you're getting a
syntax error because Access doesn't expect to evaluate a Parameters clause
in your circumstances. See "(4) Parameters Clause" below for more
information.
To remove the Parameters clause, follow these steps:
1. Open the query in design view.
2. Open the Query menu and select Parameters.
3. Delete the above parameter (and any other parameters) from the Query
Parameters dialog.
4. Switch to SQL view to make sure the parameters clause has been
removed.
5. Save the query.
(2) Query "qlbCustomerOpenInvoice"
The same applies to the query "qlbCustomerOpenInvoice". This query acts as
the Row Source for the ChooseCust combo box. Likewise, this query is not
opened by VBA code. Therefore, the query should not have a Parameters
clause. If it has a Parameters clause, remove it using the above technique.
(3) Query "qryWorkOrders_uninvoiced"
The same applies to the query "qlbCustomerOpenInvoice". This query acts as
the Record Source for the form "frmInvoiceSelect". Likewise, this query is
not opened by VBA code. Therefore, the query should not have a Parameters
clause. If it has a Parameters clause, remove it using the above technique.
(4) Parameters Clause
A query needs a Parameters clause when you open the query in VBA code. Then
your code can give the parameters values - in other words, the Parameters
clause is a means of putting criteria into the query when the query is run
from VBA code. If you're not opening a query in code, then you don't need
the Parameters clause because the query can obtain the criteria directly
from the form "frmInvoiceSelect" (in your case) or, more generally, directly
from the user by displaying a prompt for the user to enter the criteria.
Let me know how things work after the Parameters clauses have been removed.
-------------------------------------------------------------SECTION 3:
I realize this has been increadbly time consuming for you and I really do
appreciate your help. I decided yesterday to go on line with Microsoft to
try and help the situation. My code was confirmed to be valid and they
really do not understand what is creating this problem.
The information about the detail section I mentioned earlier was made
available to Microsoft today and their response will be interesting. I
will share with you their results because you have more than gracious
with your time and knowledge.
I'd like to hear what they come up with.
Regards
Geoff
.
- Follow-Ups:
- Re: access 2003
- From: Geoff
- Re: access 2003
- References:
- RE: access 2003
- From: doglover
- Re: access 2003
- From: Geoff
- Re: access 2003
- From: doglover
- Re: access 2003
- From: doglover
- RE: access 2003
- Prev by Date: Re: access 2003
- Next by Date: Re: Database opens as Read Only in Access 2003
- Previous by thread: Re: access 2003
- Next by thread: Re: access 2003
- Index(es):