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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|