Opening a form from another form aqccess2007

G

Geoff

Hi
i am trying to replicate something that worked everytime in Access 2003:
Form 1 has a field called grade - example data 2 or 3, etc. I have created a
button which should open form 2 but only display records where the grade
field in the record in form 1 = the grade field in form 2. but it displays
all records..

I've tried it with different fields ie surname to surname, looked at the
expression created but no joy. any ideas, anyone..
 
G

Geoff

Hi RG

I'm not actually coding but using the command button wizard. The button is
on form stsffgrgade and should open up form frm_staff but only where the
staff id on the former matches.The macro code created:

Openform
Argument: frm_staff, Form, , "[staff_id]=" & "'" & [staff_id] & "'", , Normal
Condition: "[staff_id]=" & "'" & [staff_id] & "'"
 
G

Geoff

Hi again

yep both text fields actually from the same table. One form shows minimal
staff details and the form that is opened from the button shows stuff such as
salary, bonus, etc.



ruralguy via AccessMonster.com said:
Is [staff_id] a string (text) field?
Hi RG

I'm not actually coding but using the command button wizard. The button is
on form stsffgrgade and should open up form frm_staff but only where the
staff id on the former matches.The macro code created:

Openform
Argument: frm_staff, Form, , "[staff_id]=" & "'" & [staff_id] & "'", , Normal
Condition: "[staff_id]=" & "'" & [staff_id] & "'"
What code are you using to open the next form? Can you post it?
[quoted text clipped - 7 lines]
I've tried it with different fields ie surname to surname, looked at the
expression created but no joy. any ideas, anyone..

--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top