It sounds like you are not putting the PK from selected record in the Users
form (main form?) into the FK field in the "related table form".
What arguments are you passing from the "main form"? Are you passing the PK?
Actually, what is the code form the command button now? (I went and read a few
of your previous posts.)
--
Steve S.
--------------------------------
"Veni, Vidi, Velcro"
(I came, I saw, I stuck around.)
WCDoan wrote:
> I apologize if this has been answered before. I looked but could not find a
> post for this particular problem. I'm using a form that has a command button
> that calls another form. The table on the form that is called is related to
> the table in the main form by CustomerID field...PK in main form, FK in
> called form. A record in the main table is selected and then you press the
> command button to call the form to enter the related data in the other table.
> Thanks to Roger for getting me this far with passing arguments. I have the
> correct fields for the data in the called form, but when I try to add a
> record to this table, I get the 'can not add or change a record because a
> related record is required in table users.' The table Users is the table
> bound to the main form. I thought since that record was already selected, I
> could add a record in the related table, but evidently I'm not doing
> something right...which is not unusual for me with Access and VBA, although I
> am getting better. Anyhow, if anyone could shed light on this I would
> appreciate it.
> Thanks,
> Randy M
|