Can't get existing "table" records to display in a "form."

G

Guest

I created a form to enter records to an existing table. The records created
prior to creating the form do not register in the form when it is opened.
Records entered using the form do show up in both the form and the table. How
do I tell the form to show all of the records that exist in the table? (The
form has the record number indicator and navigation arrows at the bottom.)
Peter P.
 
D

Dirk Goldgar

PP@CURF said:
I created a form to enter records to an existing table. The records
created prior to creating the form do not register in the form when
it is opened. Records entered using the form do show up in both the
form and the table. How do I tell the form to show all of the records
that exist in the table? (The form has the record number indicator
and navigation arrows at the bottom.) Peter P.

A) Is the form's Data Entry property set to Yes? That would be
requesting the behavior you describe.

B) Was the form opened by code or by a macro that specified opening it
in "data entry"mode?
 
G

Guest

The data entry property in both the form and its subform is set to "NO"
Should it be set to "YES" in both form and subform? Peter P.
 
D

Dirk Goldgar

PP@CURF said:
The data entry property in both the form and its subform is set to
"NO" Should it be set to "YES" in both form and subform? Peter P.

No. That would be *asking* for the behavior you're seeing, which you
don't want.

How is the form being opened? Are you opening it by clicking button on
a switchboard of some sort, or are you double-clicking on it in the
database window? If you open it the latter way, does it still hide all
pre-existing records?
 
G

Guest

It is not opened with a macro. I open it by double clicking it in the
database window.
Peter P.
 
D

Dirk Goldgar

PP@CURF said:
It is not opened with a macro. I open it by double clicking it in the
database window.

What is in the RecordSource property of the form? Is it just the name
of a table, or is it a query (a stored query or an SQL statement)? If
it's a query, what is the SQL of the query?

I'm wondering if the form is based on a query that excludes existing
records.
 
G

Guest

The RecordSource for the form is a query. the SQL statement is as follows:

SELECT Invoices.*, [Purchase Orders].PurchaseOrderNumber
FROM [Purchase Orders] INNER JOIN Invoices ON [Purchase Orders].POrderID =
Invoices.POrderID
WHERE (((Invoices.POrderID)=[forms]![Invoices]![POrderID]));

I have a feeling that it excludes existing records, but can't pinpoint where.
 
G

Guest

I substituted my INVOICES table for the query in the Record Source line and
it wourks just fine now. Thank you for the help.

Peter P.
 
D

Dirk Goldgar

PP@CURF said:
The RecordSource for the form is a query. the SQL statement is as
follows:

SELECT Invoices.*, [Purchase Orders].PurchaseOrderNumber
FROM [Purchase Orders] INNER JOIN Invoices ON [Purchase
Orders].POrderID = Invoices.POrderID
WHERE (((Invoices.POrderID)=[forms]![Invoices]![POrderID]));

I have a feeling that it excludes existing records, but can't
pinpoint where.

That query will only return records where the POrderID field in table
Invoices matches the value in the POrderID text box in the current
record of the form named "Invoices" (which must be open). Is that form
open? Is there a value in the text box on that form?
 

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