WarrenGlass
asked on
How to add rows of data for the same ID?
I have a table with three columns: PersonID, FreeDate and FreeTime. I made a form with three combo boxes to select the three items from three separate sources. This works. What I need help on is when I select the PersonID, I want to keep selecting FreeDates and FreeTimes for the same person without having to re-select the PersonID each time. Any suggestions on the best way to do this?
Warren
Warren
Hi WarrenGlass,
Assuming that the PersonID TextBox on your form called "PersonID", then on the form's AfterUpdate event place something like:
Private Sub Form_AfterUpdate()
Me.PersonID.DefaultValue = Me!PersonID
End Sub
This will set up the default value of PersonID for the next entry phase.
HTH,
Nosterdamus
Assuming that the PersonID TextBox on your form called "PersonID", then on the form's AfterUpdate event place something like:
Private Sub Form_AfterUpdate()
Me.PersonID.DefaultValue = Me!PersonID
End Sub
This will set up the default value of PersonID for the next entry phase.
HTH,
Nosterdamus
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
- PAQ'd and pts removed
Please leave any comments here within the
next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !
Nic;o)
ASKER
Hi Nic;o,
I did not get this to work the way I wanted before I had to work on another project. I will be back on this Wednesday and will either accept an answer or expand on my question. Thank you for following up!!!!!!
Warren
I did not get this to work the way I wanted before I had to work on another project. I will be back on this Wednesday and will either accept an answer or expand on my question. Thank you for following up!!!!!!
Warren
Hi Warren,
I'm just cleaning the old Q's as they are unlikely to draw new comments.
When this didn't solve the problem, I'll change my recommandation into:
- PAQ and pts refunded
thus enabling you to post a new (expanded) question.
Keep me posted ;-)
Nic;o)
I'm just cleaning the old Q's as they are unlikely to draw new comments.
When this didn't solve the problem, I'll change my recommandation into:
- PAQ and pts refunded
thus enabling you to post a new (expanded) question.
Keep me posted ;-)
Nic;o)
ASKER
Thanks to everyone for your responses! The accepted response worked as soon as I remembered to set up the relationship between the two tables.
Warren
Warren
Glad I could help ;-)
Success with the application !
Nic;o)
Success with the application !
Nic;o)
Cheers, Andrew