Open Form

A

AJ

I have a form "PrintingForm", when I open from the Forms screen it opens
just fine and works great. It is based up on a query, shows the recordes
that aren't filtered as well as can add a new record too.

When I try to open with code either on a command button or the switchboard
the form opens with the unfiltered records, but can not add a new record.

Any thoughts?
 
D

Dirk Goldgar

AJ said:
I have a form "PrintingForm", when I open from the Forms screen it opens
just fine and works great. It is based up on a query, shows the recordes
that aren't filtered as well as can add a new record too.

When I try to open with code either on a command button or the switchboard
the form opens with the unfiltered records, but can not add a new record.

Any thoughts?


Please post the code that opens the form. Also, if the RecordSource of the
form is a query, please post the SQL of that query.
 
J

Johan

AJ said:
I have a form "PrintingForm", when I open from the Forms screen it opens
just fine and works great. It is based up on a query, shows the recordes
that aren't filtered as well as can add a new record too.

When I try to open with code either on a command button or the switchboard
the form opens with the unfiltered records, but can not add a new record.

Any thoughts?
 
A

AJ

The form open off the switchboard, so it is the default switchboard code from
teh wizard. I use switchboard option 3.

Here is the code for the qry:

SELECT DISTINCTROW PrintTable.PrintID, PrintTable.JobNumber,
PrintTable.ProductCode, PrintTable.LotNumber, PrintTable.PackType,
PrintTable.PackStyle, PrintTable.ChangeStart, PrintTable.JobStart,
PrintTable.JobEnd, PrintTable.Press, PrintTable.QtyPrinted,
PrintTable.Reprint, PrintTable.JobWaste, PrintTable.Closed
FROM PrintTable
WHERE (((PrintTable.Closed)=No));


Now, I had the switchboard table in the back-end. I moved it to the front
end and the form works great.

I don't understand this but somewhere in there lies the problem.

thank you
 
D

Dirk Goldgar

AJ said:
The form open off the switchboard, so it is the default switchboard code
from
teh wizard. I use switchboard option 3.

Nothing wrong there.
Here is the code for the qry:

SELECT DISTINCTROW PrintTable.PrintID, PrintTable.JobNumber,
PrintTable.ProductCode, PrintTable.LotNumber, PrintTable.PackType,
PrintTable.PackStyle, PrintTable.ChangeStart, PrintTable.JobStart,
PrintTable.JobEnd, PrintTable.Press, PrintTable.QtyPrinted,
PrintTable.Reprint, PrintTable.JobWaste, PrintTable.Closed
FROM PrintTable
WHERE (((PrintTable.Closed)=No));

Nothing wrong there.
Now, I had the switchboard table in the back-end. I moved it to the
front
end and the form works great.

That's odd. The location of the Switchboard_Items table in the front- or
back-end shouldn't make any difference to the whether the form opens
read-only or not. I've tested a switchboard with the table linked from
another database, and it had no effect.
I don't understand this but somewhere in there lies the problem.

I don't understand it, either. Normally I would put the Switchboard_Items
table in the front-end anyway, as I consider it part of the user interface,
whch is the front-end's domain. But I can't explain why it was misbehaving
before.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top