Suggestions Please! re: New Comment Form

optionone

Registered User.
Local time
Today, 15:31
Joined
Feb 11, 2010
Messages
56
Hi,

I am a bit stuck on the best way to do this - have a multi-paged form with 3 main tables (main patient register, prior approval data, comments and dates). The particular form in question is as image below:

The relationship between the tables is one to many- so patient register has one line per patient but the subform below (the prior approval table -linked on PTID) can be one or many - likewise for the subform below that as each prior approval can have one or many comments (linked on ID).

What I was hoping to do was press the (currently unbound) 'run query' button to the right of the comments that would 'pluck' the ID field from the subform and open a new form to enter a new comment

Unless there is a better way to do this? Any help appreciated - thanks!
 
Last edited:
Can't open that link - try attaching the image to your post
 
Is it not possible to enter the comment in the subform as it is?
 
But if you want to open a form to enter the comment, you could use the link criteria of the subform to ensure you're entering the comment for the patient.
 
You can open a form to do that. You would use
Code:
DoCmd.OpenForm "YourFormForEntering", DataMode:= acFormAdd, OpenArgs:= Me.YourSubformControlNameHere.Form.IDTextBoxNameHere
And you would use the OpenArgs to set the ID in the form - so in the comments form that opens up you would have this in the On Load event:

Code:
If Me.OpenArgs<>"" Then
   Me.YourTextboxForIDOnCommentsForm = CLng(Me.OpenArgs)
End If
 

Users who are viewing this thread

Back
Top Bottom