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
|
|||
|
|||
Open Datasheet from Sub Form
This may take a little to explain, but I hope I can get you to understand my
setup. I have a sub form which shows a list of records assigned to a user. This list is filtered by selecting a person from a combo box on the main page. I used a Link Master/Child field on the sub form to get this to work. I have several columns in the sub form that I would like to double click on and it will open a new form. I was able to setup the first column to open a form on the selected item in form view. My problem is I have a column which shows a persons name, I want to double click on the name and open a new form in datasheet view. I want to display all records with this persons name in datasheet form. When I double click now I get, "Enter Parameter Value". When I manually type in a persons name it opens the correct form and displays all records with the persons name. If I close the main form and open the sub form by itself and double click on a record in the person column it opens the form and filters the correct records by itself. I have the following line in the criteria line of my query, [Forms]! [Unassigned Sub Form]![sales_person] What am I missing? Does the Master/Child have anything to do with this? Thanks for any help you can lend me. MiHutch -- Message posted via http://www.accessmonster.com |
#2
|
|||
|
|||
Open Datasheet from Sub Form
On Thu, 01 Oct 2009 04:28:23 GMT, "MiHutch via AccessMonster.com"
u53459@uwe wrote: You got that criteria line wrong. To access a control in a subform use: Forms!myForm!mySubformControlName.Form!myControlIn Subform (of course you replace myObjectNames with yours) -Tom. Microsoft Access MVP This may take a little to explain, but I hope I can get you to understand my setup. I have a sub form which shows a list of records assigned to a user. This list is filtered by selecting a person from a combo box on the main page. I used a Link Master/Child field on the sub form to get this to work. I have several columns in the sub form that I would like to double click on and it will open a new form. I was able to setup the first column to open a form on the selected item in form view. My problem is I have a column which shows a persons name, I want to double click on the name and open a new form in datasheet view. I want to display all records with this persons name in datasheet form. When I double click now I get, "Enter Parameter Value". When I manually type in a persons name it opens the correct form and displays all records with the persons name. If I close the main form and open the sub form by itself and double click on a record in the person column it opens the form and filters the correct records by itself. I have the following line in the criteria line of my query, [Forms]! [Unassigned Sub Form]![sales_person] What am I missing? Does the Master/Child have anything to do with this? Thanks for any help you can lend me. MiHutch |
#3
|
|||
|
|||
Open Datasheet from Sub Form
Worked great, I knew I forgot something. I guess I was trying to bypass the
main page and use the subform only. Thanks MiHutch Tom van Stiphout wrote: You got that criteria line wrong. To access a control in a subform use: Forms!myForm!mySubformControlName.Form!myControlI nSubform (of course you replace myObjectNames with yours) -Tom. Microsoft Access MVP This may take a little to explain, but I hope I can get you to understand my setup. [quoted text clipped - 26 lines] MiHutch -- Message posted via http://www.accessmonster.com |
#4
|
|||
|
|||
Open Datasheet from Sub Form
On Thu, 01 Oct 2009 15:45:57 GMT, "MiHutch via AccessMonster.com"
u53459@uwe wrote: If your code is on the mainform, you can certainly abbreviate the expression: Me.mySubformControlName.Form!myControlInSubform -Tom. Microsoft Access MVP Worked great, I knew I forgot something. I guess I was trying to bypass the main page and use the subform only. Thanks MiHutch Tom van Stiphout wrote: You got that criteria line wrong. To access a control in a subform use: Forms!myForm!mySubformControlName.Form!myControl InSubform (of course you replace myObjectNames with yours) -Tom. Microsoft Access MVP This may take a little to explain, but I hope I can get you to understand my setup. [quoted text clipped - 26 lines] MiHutch |
Thread Tools | |
Display Modes | |
|
|