Main form - sub form functionality

Georgemel

New member
Local time
Today, 11:15
Joined
Aug 14, 2019
Messages
8
Hi Everyone, I need some assistance with a VBA function that can assist me to pre-populate my subform with dates linked to a WeekNumber drop down in my main form. The sub form needs to be pre-populated as soon as I select the week number from the drop down and the user have to be able to still remove the dates they don't want so it cannot be linked to the main table. :banghead::banghead:
 
Welcome to AWF!.

One method - In the sub form have a hidden field representing the week number of the date(s) you are displaying.

Make that the master child link field with the week number combo. You may need to add a year number to stop getting results from other years.
 
sample for you to study.
 

Attachments

Thanks Minty but I am not sure if it would work, see my image attached.
The top portion is part of the main table and the bottom is a sub form.

What I want to achieve is when I select the week in the main form the sub form creates the new records automatically for that week by default based on the selection made. (This info is stored in a table)

1. The user must be able to deleted days not required for the entry when required.
2. The user have to be able to insert additional dates as required.
 

Attachments

  • Untitled-1.jpg
    Untitled-1.jpg
    94.7 KB · Views: 121
Hi arnelgp, I have tried changing my db with what you did with the db you attached but I am doing something wrong with it. May I load my db on box for you as it is about 30mb in size.
 
just make a trim version of your db.
include the form, the table or query that the form is using.
 
plz check and test.
 

Attachments

Thanks a Mil, this is working 100%
Thank you again for your assistance
 
you're welcome.
 
Is there any way for me to get the dates inserted by using the default in WeekNo field?
 

Users who are viewing this thread

Back
Top Bottom