Form

sdkramer

Registered User.
Local time
Today, 00:07
Joined
Mar 19, 2002
Messages
64
I've got a form with all kinds of data on it about a student, and I have a command button that opens another form that allows you to enter a memo about that student. I've bound the comment box to the memo field in the table, but I need to pass the ID of the student so that the comment can be entered on the correct student's memo field, currently it places it in the first student's memo field. Can someone help me with this?
 
Try this from your command button event procedure:

DoCmd.OpenForm "MyMemoForm",,,"MyMemoFormID = " & me!MyStudentID

Hope this helps,

Peter De Baets
Peter's Software - MS Access Tools for Developers http://www.peterssoftware.com
 
Thank you so very much, but this works perfectly except for one case. When the form is moved to a new record. If you try to access the other form with the command button it won't let you because there is no ID field.

Any suggestions on how to take care of this. If not it's not a big deal. I doubt they would plan on entering information into the table here first anyway.
 
If IsNull(Me.MyIDField) Then
MsgBox"There's no record entered yet dummy"
Exit Sub
End If
DoCmd.OpenForm "MyMemoForm",,,"MyMemoFormID = " & me!MyStudentID
 

Users who are viewing this thread

Back
Top Bottom