Multiple records from same table as subforms controlled by unbound main form

R

RavenNoir

I have Googled this problem to death and it has me pulling my hair
out...

I have a table tblSchedule whose primary key is a date field (one
record per date). I don't want to enter records one day at a time -- I
want to work with a block of two weeks' worth of days at once.

I created an unbound form containing a calendar object. Below that
calendar object are 10 subforms - one for each weekday within the
two-week period that is selected by clicking on a Monday in the
calendar object on the main form.

I was able to get the code working that updates the textbox control for
the dtDate (primary key) field on all of the subforms, but it doesn't
seem like the subforms are refreshed (create a new record or pull the
data for the current record) when their dtDate textbox controls are
changed in the code.

I tried forcing a save in each of the subforms before updating the
textbox control, then requerying/refreshing the subform after updating
the textbox control, but I'm getting duplicate record errors.

I'm a newbie at this (pleading desperately for help) so let me know
what additional information is needed. Thanks in advance for saving
what is left of my hair - it's quite grey at this point, but I'm still
rather attached to it.
 
R

RavenNoir

Disregard as I have finally wised up. Created a hidden textbox on the
main form for each subform, set its value in the calendar control's
onclick event, and set the subform's Link Master Fields property to the
textbox control. Hooray! (I still hate Access.)
 

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