A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Buttons don't lead to the desired record



 
 
Thread Tools Display Modes
  #1  
Old June 11th, 2009, 10:30 AM posted to microsoft.public.access.tablesdbdesign
Gosha
external usenet poster
 
Posts: 13
Default Buttons don't lead to the desired record

Hi
I am working on a database and I need to have buttons refering to other
forms on my main form.
I have tried the wizard and macro builder - know nothing about VBA.
The problem is that when e.g. I am looking at funder no12 on the main form I
click on the button 'contacts', the contact form appears but shows contact
for funder no1 - so it always shows funder no1 - no matter what funder I am
looking at.
I have one-to-many relationships created all conected bu Funder Id field and
it a PK in one table only.
What weird to me is that i already have a subform on the main form and it
connects two tables with no problems - but i can have another subform on the
main form - no more space.
Please help!
Thanks
  #2  
Old June 11th, 2009, 03:21 PM posted to microsoft.public.access.tablesdbdesign
Klatuu
external usenet poster
 
Posts: 7,074
Default Buttons don't lead to the desired record

What you are seeing is normal. Forms and Subforms are linked together using
the Link Master and Link Child Field properties. But, since each form has
its own recordset and there is no relationship between the forms, you have to
control which record is displayed.

There are a number of ways to do this, but the easiest is to use the Where
condition of the OpenForm Action or Method. Since you are using Macros, you
will want to use the OpenForm Action. In the macro builder, you will see the
Where Condition argument. You use that argument to tell the form which
record to show when it opens.
--
Dave Hargis, Microsoft Access MVP


"Gosha" wrote:

Hi
I am working on a database and I need to have buttons refering to other
forms on my main form.
I have tried the wizard and macro builder - know nothing about VBA.
The problem is that when e.g. I am looking at funder no12 on the main form I
click on the button 'contacts', the contact form appears but shows contact
for funder no1 - so it always shows funder no1 - no matter what funder I am
looking at.
I have one-to-many relationships created all conected bu Funder Id field and
it a PK in one table only.
What weird to me is that i already have a subform on the main form and it
connects two tables with no problems - but i can have another subform on the
main form - no more space.
Please help!
Thanks

  #4  
Old June 12th, 2009, 09:21 AM posted to microsoft.public.access.tablesdbdesign
Gosha
external usenet poster
 
Posts: 13
Default Buttons don't lead to the desired record

Hi
Thanks for your reply.

I have already tried openform action macro

when i use the wizard i select matching fileds as Contacts![Funder Id] and
Funders![Funder Id] then i get a where condition put in automaticaly by
access. when i go to properties it looks like that:

"[Funder ID]=" & [Funder ID]

I ve tried to modify it to:

[Funder ID]=Forms![Funders]![Funder ID]

but the access automatically add brackets around the 'Forms!'

and when i try to run the modifed macro i get prompt:
'Enter Parameter Value'
Forms!Funders!Funder ID
______________________

when i type the desired number it goes to it.......

but as you might imagine that is not what i need.

Do you know why this happens?
I have searched everywhere...



"Klatuu" wrote:

What you are seeing is normal. Forms and Subforms are linked together using
the Link Master and Link Child Field properties. But, since each form has
its own recordset and there is no relationship between the forms, you have to
control which record is displayed.

There are a number of ways to do this, but the easiest is to use the Where
condition of the OpenForm Action or Method. Since you are using Macros, you
will want to use the OpenForm Action. In the macro builder, you will see the
Where Condition argument. You use that argument to tell the form which
record to show when it opens.
--
Dave Hargis, Microsoft Access MVP


"Gosha" wrote:

Hi
I am working on a database and I need to have buttons refering to other
forms on my main form.
I have tried the wizard and macro builder - know nothing about VBA.
The problem is that when e.g. I am looking at funder no12 on the main form I
click on the button 'contacts', the contact form appears but shows contact
for funder no1 - so it always shows funder no1 - no matter what funder I am
looking at.
I have one-to-many relationships created all conected bu Funder Id field and
it a PK in one table only.
What weird to me is that i already have a subform on the main form and it
connects two tables with no problems - but i can have another subform on the
main form - no more space.
Please help!
Thanks

  #5  
Old June 13th, 2009, 04:00 AM posted to microsoft.public.access.tablesdbdesign
Gina Whipp
external usenet poster
 
Posts: 3,500
Default Buttons don't lead to the desired record

Gosha,

Try "[Funder ID]=" & Forms![Funders]![Funder ID]

However, I wonder which form you are actually on when you try to run this
Where condition. Perhaps you should explain a bit further what you are
trying to do.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Gosha" wrote in message
...
Hi
Thanks for your reply.

I have already tried openform action macro

when i use the wizard i select matching fileds as Contacts![Funder Id] and
Funders![Funder Id] then i get a where condition put in automaticaly by
access. when i go to properties it looks like that:

"[Funder ID]=" & [Funder ID]

I ve tried to modify it to:

[Funder ID]=Forms![Funders]![Funder ID]

but the access automatically add brackets around the 'Forms!'

and when i try to run the modifed macro i get prompt:
'Enter Parameter Value'
Forms!Funders!Funder ID
______________________

when i type the desired number it goes to it.......

but as you might imagine that is not what i need.

Do you know why this happens?
I have searched everywhere...



"Klatuu" wrote:

What you are seeing is normal. Forms and Subforms are linked together
using
the Link Master and Link Child Field properties. But, since each form
has
its own recordset and there is no relationship between the forms, you
have to
control which record is displayed.

There are a number of ways to do this, but the easiest is to use the
Where
condition of the OpenForm Action or Method. Since you are using Macros,
you
will want to use the OpenForm Action. In the macro builder, you will see
the
Where Condition argument. You use that argument to tell the form which
record to show when it opens.
--
Dave Hargis, Microsoft Access MVP


"Gosha" wrote:

Hi
I am working on a database and I need to have buttons refering to other
forms on my main form.
I have tried the wizard and macro builder - know nothing about VBA.
The problem is that when e.g. I am looking at funder no12 on the main
form I
click on the button 'contacts', the contact form appears but shows
contact
for funder no1 - so it always shows funder no1 - no matter what funder
I am
looking at.
I have one-to-many relationships created all conected bu Funder Id
field and
it a PK in one table only.
What weird to me is that i already have a subform on the main form and
it
connects two tables with no problems - but i can have another subform
on the
main form - no more space.
Please help!
Thanks



  #6  
Old June 16th, 2009, 10:45 AM posted to microsoft.public.access.tablesdbdesign
Gosha
external usenet poster
 
Posts: 13
Default Buttons don't lead to the desired record

Hi Gina

Thank for you reply.

I copied what you wort into where condition. When I run the macro it prompts
for the parameter value again

I am trying to open the contacts form from the Funders form which is my main
form.

Thank again

Gosha


"Gina Whipp" wrote:

Gosha,

Try "[Funder ID]=" & Forms![Funders]![Funder ID]

However, I wonder which form you are actually on when you try to run this
Where condition. Perhaps you should explain a bit further what you are
trying to do.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Gosha" wrote in message
...
Hi
Thanks for your reply.

I have already tried openform action macro

when i use the wizard i select matching fileds as Contacts![Funder Id] and
Funders![Funder Id] then i get a where condition put in automaticaly by
access. when i go to properties it looks like that:

"[Funder ID]=" & [Funder ID]

I ve tried to modify it to:

[Funder ID]=Forms![Funders]![Funder ID]

but the access automatically add brackets around the 'Forms!'

and when i try to run the modifed macro i get prompt:
'Enter Parameter Value'
Forms!Funders!Funder ID
______________________

when i type the desired number it goes to it.......

but as you might imagine that is not what i need.

Do you know why this happens?
I have searched everywhere...



"Klatuu" wrote:

What you are seeing is normal. Forms and Subforms are linked together
using
the Link Master and Link Child Field properties. But, since each form
has
its own recordset and there is no relationship between the forms, you
have to
control which record is displayed.

There are a number of ways to do this, but the easiest is to use the
Where
condition of the OpenForm Action or Method. Since you are using Macros,
you
will want to use the OpenForm Action. In the macro builder, you will see
the
Where Condition argument. You use that argument to tell the form which
record to show when it opens.
--
Dave Hargis, Microsoft Access MVP


"Gosha" wrote:

Hi
I am working on a database and I need to have buttons refering to other
forms on my main form.
I have tried the wizard and macro builder - know nothing about VBA.
The problem is that when e.g. I am looking at funder no12 on the main
form I
click on the button 'contacts', the contact form appears but shows
contact
for funder no1 - so it always shows funder no1 - no matter what funder
I am
looking at.
I have one-to-many relationships created all conected bu Funder Id
field and
it a PK in one table only.
What weird to me is that i already have a subform on the main form and
it
connects two tables with no problems - but i can have another subform
on the
main form - no more space.
Please help!
Thanks




  #7  
Old June 16th, 2009, 03:38 PM posted to microsoft.public.access.tablesdbdesign
Gina Whipp
external usenet poster
 
Posts: 3,500
Default Buttons don't lead to the desired record

Gosha,

Okay, then I will need the exact name of the Contacts form and the exact
name of the Funders form as well as the field names and what 'connects'
those two forms together, which might be Funder ID???

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Gosha" wrote in message
...
Hi Gina

Thank for you reply.

I copied what you wort into where condition. When I run the macro it
prompts
for the parameter value again

I am trying to open the contacts form from the Funders form which is my
main
form.

Thank again

Gosha


"Gina Whipp" wrote:

Gosha,

Try "[Funder ID]=" & Forms![Funders]![Funder ID]

However, I wonder which form you are actually on when you try to run this
Where condition. Perhaps you should explain a bit further what you are
trying to do.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Gosha" wrote in message
...
Hi
Thanks for your reply.

I have already tried openform action macro

when i use the wizard i select matching fileds as Contacts![Funder Id]
and
Funders![Funder Id] then i get a where condition put in automaticaly by
access. when i go to properties it looks like that:

"[Funder ID]=" & [Funder ID]

I ve tried to modify it to:

[Funder ID]=Forms![Funders]![Funder ID]

but the access automatically add brackets around the 'Forms!'

and when i try to run the modifed macro i get prompt:
'Enter Parameter Value'
Forms!Funders!Funder ID
______________________

when i type the desired number it goes to it.......

but as you might imagine that is not what i need.

Do you know why this happens?
I have searched everywhere...



"Klatuu" wrote:

What you are seeing is normal. Forms and Subforms are linked together
using
the Link Master and Link Child Field properties. But, since each form
has
its own recordset and there is no relationship between the forms, you
have to
control which record is displayed.

There are a number of ways to do this, but the easiest is to use the
Where
condition of the OpenForm Action or Method. Since you are using
Macros,
you
will want to use the OpenForm Action. In the macro builder, you will
see
the
Where Condition argument. You use that argument to tell the form
which
record to show when it opens.
--
Dave Hargis, Microsoft Access MVP


"Gosha" wrote:

Hi
I am working on a database and I need to have buttons refering to
other
forms on my main form.
I have tried the wizard and macro builder - know nothing about VBA.
The problem is that when e.g. I am looking at funder no12 on the
main
form I
click on the button 'contacts', the contact form appears but shows
contact
for funder no1 - so it always shows funder no1 - no matter what
funder
I am
looking at.
I have one-to-many relationships created all conected bu Funder Id
field and
it a PK in one table only.
What weird to me is that i already have a subform on the main form
and
it
connects two tables with no problems - but i can have another
subform
on the
main form - no more space.
Please help!
Thanks






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:10 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.