Hi,
I am assuming that the tables in your patient and visit forms are linked somehow PATIENT<->VISIT 1:M relationship?
If that is the case then you need to bear in mind the following - it is easy to do so these pointers should help you.
1) The record will need to be entered into the parent table PATIENT first - this may seem obvious, but Access is a pain at reporting errors at times.
2) Once the record has been added to your main form then you need to select it somehow - look at RowSource on your main for,
3) Once the record is displayed then you can get your PK from the main form - this will be used as the base for the sub form presumably. Once you have this value then it is a simply case to add the record to your secondary table and refresh the sub form.
Hope this helps.
Andrew