I have a module that adds records to a table, and then must use the new
records for a continuous form. If I open the form immediately from the
program, there are no records. If I close the form the module is launched
from, then open the form manually, the records are there. how can I open the
form from the same module that added the records? So i guess what I am
asking is how to I force the records to be saved in the table before I open
the form?
Steve - 12 May 2007 01:03 GMT
After you add each record you need to run this code:
DoCmd.RunCommand acCmdSaveRecord
PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
resource@pcdatasheet.com
>I have a module that adds records to a table, and then must use the new
> records for a continuous form. If I open the form immediately from the
[quoted text clipped - 5 lines]
> open
> the form?
Marshall Barton - 12 May 2007 01:32 GMT
>I have a module that adds records to a table, and then must use the new
>records for a continuous form. If I open the form immediately from the
[quoted text clipped - 3 lines]
>asking is how to I force the records to be saved in the table before I open
>the form?
Requery the form.
BUT you need to make sure that the records additions
completed first. This is automatic if you use the Execute
method (instead of RunSQL).

Signature
Marsh
MVP [MS Access]