I've been working on this too long!! Put the datamacro on the wrong table. Fixed that. There's still something not working when you try to go from the Participant Entry form to the Sports Form. I appreciate your help!!
I've been working on this too long!! Put the datamacro on the wrong table. Fixed that. There's still something not working when you try to go from the Participant Entry form to the Sports Form. I appreciate your help!!
Oh boy! You've been busy!
You have a severe case of spreadsheetitis. BUT since you are on a quick deadline I'm guessing you don't have time to redesign?
Anyway, there are typos in your table macro. In the value of both set field actions change the ! to a . like so
is supposed to look like:Code:[MainParticipants]![participantID]
then it works as requested.Code:[MainParticipants].[ParticipantID]
I fixed the macros, but there are still 2 problems.
(1)When you have the "Enter Participants" form open, and click on the "Transportation" button, it takes you to the "Transportation" form, with data for the same person displayed. This is how it should work for going from "Enter Participants" to "Sports," but you get a dialog box asking for the participantid. I have gone over all the pages on the Sports form, all the subforms, and can't see what the problem is.
(2) Despite the data macros, when you click on "Add a person" on the "Enter Participants" form and go to either "Sports" or "Transportation," you don't have a record number or name in the header of those forms. Do I need something other than the "add" based on the command button wizard, for the data macros to kick in?
Thank you so much. I feel like we are getting close to getting this working.
QryMainSports criteria references [MainParticipants]![ParticipantID], should be [Forms]![Participant Entry Form]![ParticipantID]
Also change the code in Sports button macro to: "[SParticipantID]=" & [ParticipantID]
Sports form events have =[ParticipantID]=Forms![Participant Entry Form]!ParticipantID. Should be =[SParticipantID]=Forms![Participant Entry Form]!ParticipantID. Actually, I've never seen event properties used this way.
Record is committed to table when: 1) close table/query/form; or 2) move to another record; or 3) run code to save. Need to commit new person record before opening forms to reference the new record ID.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.