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
|
|||
|
|||
"If" question
I have a form ... frmExhibitor and from that form I can open frmAccounting
displaying only the data the pertains to the exhibitor selected in frmExhibitor. However, I would like to have an if that states if there is data for frmAccounting open to that data, if not then open a new form. How would I do this? |
#2
|
|||
|
|||
"If" question
margaret,
The OpenForm method has a "Where" argument. frmExhibitor should have a key unique identifier, the value of which, pertains to just that record and no others. Example would be CustID. So, when opening frmAccounting use the Where argument... DoCmd.OpenForm "frmAccounting", , , "CustID = Forms!frmExhibitor!CustID" If there is a record in frmAccounting's table, that has a CustID = to frmExhibitor CustID, frmAccounting will open on that record. If not, a New blank frmAccounting record will be displayed... -- hth Al Campagna Microsoft Access MVP http://home.comcast.net/~cccsolutions/index.html "Find a job that you love... and you'll never work a day in your life." "margaret" wrote in message ... I have a form ... frmExhibitor and from that form I can open frmAccounting displaying only the data the pertains to the exhibitor selected in frmExhibitor. However, I would like to have an if that states if there is data for frmAccounting open to that data, if not then open a new form. How would I do this? |
#3
|
|||
|
|||
"If" question
Thank you ... I actually went to the macro I had set up for the forms and
used the Where argument there. Thanks for pointing me in the right direction. "Al Campagna" wrote: margaret, The OpenForm method has a "Where" argument. frmExhibitor should have a key unique identifier, the value of which, pertains to just that record and no others. Example would be CustID. So, when opening frmAccounting use the Where argument... DoCmd.OpenForm "frmAccounting", , , "CustID = Forms!frmExhibitor!CustID" If there is a record in frmAccounting's table, that has a CustID = to frmExhibitor CustID, frmAccounting will open on that record. If not, a New blank frmAccounting record will be displayed... -- hth Al Campagna Microsoft Access MVP http://home.comcast.net/~cccsolutions/index.html "Find a job that you love... and you'll never work a day in your life." "margaret" wrote in message ... I have a form ... frmExhibitor and from that form I can open frmAccounting displaying only the data the pertains to the exhibitor selected in frmExhibitor. However, I would like to have an if that states if there is data for frmAccounting open to that data, if not then open a new form. How would I do this? |
Thread Tools | |
Display Modes | |
|
|