Dates (1 Viewer)

bob fitz

AWF VIP
Local time
Today, 07:41
Joined
May 23, 2011
Messages
4,717
In the attached DB I have made a modification in which I can enter the details in a pop up form. I want the form to open in Datasheet view, but it is opening in form view I don't know why? Please guide me.
Code:
DoCmd.OpenForm "Frm_REMARK", acFormDS
Will open the form in datasheet view but you appear to be ignoring the advice you have been given regarding your tables. I've been a forum member for quite a few years and I have observed that members stop trying to help when the advice given is ignored.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 03:41
Joined
Feb 19, 2002
Messages
42,981
I fixed the schema as best I could given I don't know anything about your process. I removed the duplicated fields so they appear in only one table. Since you seem to want the allocations to be viewed in datasheet form, I made the remarks a separate subform. As you click on a new row in the allocations table, the relevant remarks will show in the remarks table. If you prefer the remarks to be a popup, that's fine but I prefer this view since everything seems to fit.

Three things are required to sync the two subforms.
1. The recordsource query of the remarks subform uses criteria that references the PK of the allocation subform.
2. When the current event runs for the allocations subform, the code requeries the remarks subform to activate the new key value.
3. When adding a new remark, the BeforeInsert event is used to populate the foreign key that links the allocation and remarks tables.
 

Attachments

  • Database1PAT.zip
    87.6 KB · Views: 95

Kundan

Registered User.
Local time
Today, 00:41
Joined
Mar 23, 2019
Messages
118
Thanks a lot. I will study your model.
 

Users who are viewing this thread

Top Bottom