Need Help on Macro, Really confused 2

A

Athens

Im still confused.

maybe i didnt word it right the first time.

i have a form with a subform for client
in the subform i have two fields (client name, firm name) and then an open
form button is next to the two fields.
The button leads to a form where you enter in the rest of the information
for the client.

myproblem is, when you click on the button, it takes you to the form, but
the form isnt ID specific. I.e. it takes you to the first client in the
client table, not the client you are currently on.

how do i fix this?

i already have the relationships set up correctly.
i just need it to link.
 
S

Steve Schapel

Athens,

Look at the design view of the macro. You forgot to mention, but I
assume it uses the OpenForm action. Click to put your cursor in the
line for that action, and thyen look at the Properties. Is there
something entered in the Where Condition argument? This is where you
need to control the record that the second form is opening to.
 
A

Athens

Unfortunately, that didnt work either.
Thanks for all of your help Bonnie.

Im gunna have to think of another way of doing this.
 
A

Athens

Steve,

This is what is written in there: "[GRSLabID]=" & "'" & [GRSLabID] & "'"

I have Access 2007. I made the open form button using the wizard. and the
wizard asks for what the linking item is. So i chose the table linking common
ID for all of my information. I have several tables that are all linked by
that id. even though they might have other primary keys.
 
S

Steve Schapel

Athens,

The syntax of this expression would imply that the GRSLabID field is a
Text data type - is that correct? I would have assumed it is a Number
field of some sort, and if that is the case, change the Where Condition to:
"[GRSLabID]=" & [GRSLabID]
 
A

Athens

No you are correct. It is text.
The ID takes 4 letters and 4 to 5 numbers
i.e. CNDD1001

Steve Schapel said:
Athens,

The syntax of this expression would imply that the GRSLabID field is a
Text data type - is that correct? I would have assumed it is a Number
field of some sort, and if that is the case, change the Where Condition to:
"[GRSLabID]=" & [GRSLabID]

--
Steve Schapel, Microsoft Access MVP
Steve,

This is what is written in there: "[GRSLabID]=" & "'" & [GRSLabID] & "'"

I have Access 2007. I made the open form button using the wizard. and the
wizard asks for what the linking item is. So i chose the table linking common
ID for all of my information. I have several tables that are all linked by
that id. even though they might have other primary keys.
 
A

Athens

But its still not linking the corrct way. Is there any other expression i can
use? Or a filter i can apply to the macro?

Athens said:
No you are correct. It is text.
The ID takes 4 letters and 4 to 5 numbers
i.e. CNDD1001

Steve Schapel said:
Athens,

The syntax of this expression would imply that the GRSLabID field is a
Text data type - is that correct? I would have assumed it is a Number
field of some sort, and if that is the case, change the Where Condition to:
"[GRSLabID]=" & [GRSLabID]

--
Steve Schapel, Microsoft Access MVP
Steve,

This is what is written in there: "[GRSLabID]=" & "'" & [GRSLabID] & "'"

I have Access 2007. I made the open form button using the wizard. and the
wizard asks for what the linking item is. So i chose the table linking common
ID for all of my information. I have several tables that are all linked by
that id. even though they might have other primary keys.
 
S

Steve Schapel

Athens,

The expression also implies that you have a GRSLabID field in the same
place as the button that the macro is on. Is this the case?
 

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