Form/Sub Form Woes

mreference

Registered User.
Local time
Today, 18:47
Joined
Oct 4, 2010
Messages
137
I have a form that allows entry of customer details.
Beneath that is a subform that allows custoemrs vehicles to be input.

The Key field on the main form is Called ID (AutoNumber)
The CustomerID field on the subform is a Long Integar.
This is how they are linked together.

The subform is set to allow Data Entry.

However, when I fill in the customer details and click or tab intot he vehicle subform, the details from the customer are saved and the form goes blank to input a new record.

How can I get the subform to remain open to input vehicles.

cheers,
 
I'm a newbie at this game but have you checked that the Link Master and Link Child Fields have gone in to the sub-form properties ok?
 
They appear to be in and working correctly. I initially set up a form to view all records and edit information within the main form and subform wich worked perfectly.

I then created this duplicate form that just allowed data entry.
 
...I then created this duplicate form that just allowed data entry.
Exactly how did you do this? Did you make the Main Form, perhaps, Read-Only?

If the Main Form is made Read-Only by setting AllowAdditions and AllowEdits to No, all Controls on it will be Read-Only, and this includes the SubformControl!

And if the Subform is Read-Only and has no Records it will 'blank out.'

If you have the Subform set to Data Entry = Yes it will also go to a blank, New Record.

Give us a little more info on how you "created this duplicate form that just allowed data" and we can give you an approach to doing it.

Linq ;0)>
 
Exactly how did you do this? Did you make the Main Form, perhaps, Read-Only?

If the Main Form is made Read-Only by setting AllowAdditions and AllowEdits to No, all Controls on it will be Read-Only, and this includes the SubformControl!

And if the Subform is Read-Only and has no Records it will 'blank out.'

If you have the Subform set to Data Entry = Yes it will also go to a blank, New Record.
Main form is Data Entry : Yes
Allow Additions : Yes

Sub Form: Data Entry (Have tried Yes & No) Same Result
Allow Additions Yes

I made visible the customer ID in the sub form, so when a new record is created in the main form, I can see this ID number transferred to the sub form.

I thought it may be because the Customer ID in the subform was the last field in the tab order, so I moved it to the beginning, same result.

As soon as I tab into the first empty field or click in it, the main forms clears (it saves) but will not let me type anything.

The master id linking the forms is by Customer ID.

I am tearing my hair out, I have done these so many times before. Is it because I am in 2010 version?
Give us a little more info on how you "created this duplicate form that just allowed data" and we can give you an approach to doing it.

Linq ;0)>[/QUOTE]
 
I figured it out, I had a requery and refresh on AfterUpdate of the main form...doh!
 

Users who are viewing this thread

Back
Top Bottom