From: nytwodees on 7 Dec 2009 22:02 I use Access 2000. I have a form that has a command button to Create an Invoice. When this button is clicked a Dialog Pop-up form appears. The user is required to enter 2 pieces of data in this form. On this form there is a command button to Preview the invoice. I have no problem of passing the 2 pieces of user data from the Dialog Pop-up to the underlying query. What I do not know how to do is pass the initial form's CustomerID control value to the query and/or the code for the Preview command button. I know this should be pretty simple to accomplish but I am bewildered at this point, after a lot of experimenting. Help!!!
From: NG on 8 Dec 2009 07:30 Hi, there are several ways to do this, but a pretty easy way is to pass the CustomerID as an opening argument in your dialog form, example: docmd.OpenForm "MyDialogForm",,,,,acDialog,CustomerID in the code in your preview button you can then use the property OpenArgs of the form to retrieve the ID success NG "nytwodees" wrote: > I use Access 2000. > > I have a form that has a command button to Create an Invoice. When this > button is clicked a Dialog Pop-up form appears. The user is required to > enter 2 pieces of data in this form. On this form there is a command button > to Preview the invoice. > > I have no problem of passing the 2 pieces of user data from the Dialog > Pop-up to the underlying query. What I do not know how to do is pass the > initial form's CustomerID control value to the query and/or the code for the > Preview command button. > > I know this should be pretty simple to accomplish but I am bewildered at > this point, after a lot of experimenting. Help!!! > > >
From: nytwodees on 8 Dec 2009 10:29 Hi NG: Thanks for your response! 1. Do I put the following code: "docmd.OpenForm "MyDialogForm",,,,,acDialog,CustomerID" with the code for the Preview Command Button? 2. How does the query know what the criteria is for the CustomerID? 3. Can the criteria for the CustomerID be placed into the query's grid" MY level of sophistication is limited in SQL and VBA. "NG" wrote: > Hi, > > there are several ways to do this, but a pretty easy way is to pass the > CustomerID as an opening argument in your dialog form, example: > > docmd.OpenForm "MyDialogForm",,,,,acDialog,CustomerID > > in the code in your preview button you can then use the property OpenArgs of > the form to retrieve the ID > > success > NG > > "nytwodees" wrote: > > > I use Access 2000. > > > > I have a form that has a command button to Create an Invoice. When this > > button is clicked a Dialog Pop-up form appears. The user is required to > > enter 2 pieces of data in this form. On this form there is a command button > > to Preview the invoice. > > > > I have no problem of passing the 2 pieces of user data from the Dialog > > Pop-up to the underlying query. What I do not know how to do is pass the > > initial form's CustomerID control value to the query and/or the code for the > > Preview command button. > > > > I know this should be pretty simple to accomplish but I am bewildered at > > this point, after a lot of experimenting. Help!!! > > > > > >
|
Pages: 1 Prev: two linked subforms on an unbound main form Next: how do i make a changed label caption stick |