Open a tabbed Subform to a New Record

MuskokaMad

Registered User.
Local time
Today, 11:40
Joined
Feb 28, 2010
Messages
29
Thank you in advance for your assistance.

Here is the broad strokes of my challenge.

I have a sales database that handles POS transactions.

Within the program the user can select a customer from a standard search form.

This form passes the primary key for a TABLE tbl_Customers to a NEW FORM frm_CustomerHistory.

This FORM has 4 TABS the first 2 display the results from queries that show open or pending transactions and completed transactions for the client selected.

The third tab displays the details of contact between employees and that client based on a query.

It is with the third TAB tab_NewNote that I am having a problem.

I initially created a standalone form called frm_AddNewContact that collected the contact details.

Based on a discussion around work-flow it was decided it would be easier if the form existed as a new tab as opposed to a separate form.

When I put the frm_AddNewContact into the subform I run into a challenge. If I set the property of the SUBFORM to Data Entry and Allow Additions: Yes I
get the Header of frm_AddNewContact is Displayed and the Detail section of the SUBFORM is completely blank not even the controls are visible.

I have tried tried to set form to open at a new record as opposed to Data Entry in a number of events with no success.

If the Data Entry Propery is left as NO and the form is set to open without intervention the form opens with all controls visible but to an existing record (the first in the set for that customer).

Sorry for the long winded description but my head hurts from all the banging against the wall!!!
 
The first thing I would look at is if something changed that made the query read only. If you open the query directly, can you add a new record?
 
I suspect that the answer to Sean's question will be 'No!'

If a Form is bound to a Record Source

and

The Record Source is empty (as it is when Data Entry is set to Yes)

and

New Records cannot be added

no Controls will show on the Form or its tabbed pages.

The reasons that a bound Form cannot have new records added include:

1) AllowAdditions for the Form is set to No
2) The underlying Query the Form is based on is Read Only
3) User doesn't have Write Permission for the folder where the data resides.
4) Form's Recordset Type is set to Snapshot

To see if #2 is the case, and Sean and I are guessing that it is, from the Objects Dialog Box go to Queries and click on the Query that your Form is based on to open it. Now try to enter a new Record directly into the Query. If you're unable to do so, this is the cause of your problem.

If your query is Read Only, follow this link to Allen Browne’s article explaining the reasons this happens.

http://allenbrowne.com/ser-61.html

Linq ;0)>
 

Users who are viewing this thread

Back
Top Bottom