force dirty

D

deb

Main form is fProj - data for project
Subform is fDeliv - data for deliverable
SubSub form is fTL - data for transmittals

I sometimes have data that must be input into the subsubform -( ie
transmittal dates due) before I have data for the Subform.
At a later date the transmittal is ready and the TLno gets input into the
subform

Therefore I do not get an autonumber id for the subform and my subsub form
data gets lost.

how can I create a record in the subform when data is input into the
subsubform?
Is there a way to make the subform dirty and then save?
 
A

Arvin Meyer [MVP]

ALL records must have a primary key if the table requires one. Either just
work with the foreign key from the mainform, or create a record in the
subform. You can force a record by appending one in the mainform's
afterupdate event:

Dim db As DAO.Database
Dim rst As DAO.Recordset

Set db = CurrentDb
Set rst = db.OpenRecordset("YourTable", dbOpenDynaset, dbAppendOnly)
rst.AddNew
rst!SomeField = "Test"
rst.Update
 
D

deb

I tried this and nothing happened. It still did not create a record in the
tTLNo table.
 

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