Hi,
How would I go about having a command button on a form to open another form to a specific record.
I have tried and tried but cannot do so. The 2nd form open to the first record everytime.
Hi,
How would I go about having a command button on a form to open another form to a specific record.
I have tried and tried but cannot do so. The 2nd form open to the first record everytime.
thank you for your reply. Where would I put that though? What I did was make a combo box on my form to list all the students on the second form. And then I have a command button that is supposed to take me to the selected student on my second form. But the command button wont do that.
That VBA code would go in the button's Click event.
I am getting a syntax error? I have no idea what I am doing wrong.
Did you use the format appropriate to the data type of the field?
yes the field is text so i used the text format. I copied and pasted what you had and replaced the form name, field name, and control name
What exactly is your code?
DoCmd.OpenForm "Student Form", , , "Student Name = '" & Me.Student Name & "'"
The inadvisable spaces will require you to bracket names. Try:
DoCmd.OpenForm "Student Form", , , "[Student Name] = '" & Me.[Student Name] & "'"
The syntax error is still popping up
Can you post the db here?
It is too large for me to upload. is there another way I can attach it?
If you compact/repair and then zip, most db's will be small enough. If not, email it to
pbaldy
gmail
com
So this might be the problem... i have 2 forms. My student form has all the students info listed in it. I combined the students last name and first name into one field using this:
=[Last name] & ", " & [First name]
so how would this fit into your VBA code?