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 |
#11
|
|||
|
|||
On Open
"JohnLute" wrote in message
"Dirk Goldgar" wrote: Bear with me for another question or two. What do you mean when you say you want to "have cbNavigateProfiles filter to the record from frmFinishedGoods.cbProfileID"? Presumably, cbNavigateProfiles is a combo box that shows ProfileIDs. Do you mean that you want this combo box's dropdown list to show only the ProfileID from frmFinishedGoods.cbProfileID? Yes! I have a record selected in frmFinishedGoods.cbProfileID and when I click my "Go!" button I want frmQueryFGProcessingFacIDsLineIDs.cbNavigateProfil es to open to that same record. That's still not making a lot of sense to me, sorry. Combo boxes don't "open", the way I think about them. Please verify that the code I posted doesn't do what you're after, as it would make sense to me for that to be what you want. If not, I'll have to delve deeper. -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup) |
#12
|
|||
|
|||
On Open
I placed the code in the button's click event:
Private Sub cmdGOrpt_Click() On Error GoTo Err_cmdGOrpt_Click Dim stDocName As String DoCmd.OpenForm "frmQueryFGProcessingFacIDsLineIDs" Forms!frmQueryFGProcessingFacIDsLineIDs!cbProfileI D = _ Forms!frmFinishedGoods!cbProfileID DoCmd.OpenForm Me!cbSelectReportRQ, acNormal Exit_cmdGOrpt_Click: Exit Sub Err_cmdGOrpt_Click: MsgBox Err.Description Resume Exit_cmdGOrpt_Click End Sub I hope I've understood properly. When I click the button the form opens however I get the error dialog: MS Access can't find the field 'cbProfileID' referred to in your expression. I click OK to close the dialog and the form is open but NOT filtered to the correct record. frmFinishedGoods.cbProfileID is most definitely correct. Not sure why it wouldn't be found. -- www.Marzetti.com "Dirk Goldgar" wrote: "JohnLute" wrote in message "Dirk Goldgar" wrote: Bear with me for another question or two. What do you mean when you say you want to "have cbNavigateProfiles filter to the record from frmFinishedGoods.cbProfileID"? Presumably, cbNavigateProfiles is a combo box that shows ProfileIDs. Do you mean that you want this combo box's dropdown list to show only the ProfileID from frmFinishedGoods.cbProfileID? Yes! I have a record selected in frmFinishedGoods.cbProfileID and when I click my "Go!" button I want frmQueryFGProcessingFacIDsLineIDs.cbNavigateProfil es to open to that same record. That's still not making a lot of sense to me, sorry. Combo boxes don't "open", the way I think about them. Please verify that the code I posted doesn't do what you're after, as it would make sense to me for that to be what you want. If not, I'll have to delve deeper. -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup) |
#13
|
|||
|
|||
On Open
"JohnLute" wrote in message
I placed the code in the button's click event: Private Sub cmdGOrpt_Click() On Error GoTo Err_cmdGOrpt_Click Dim stDocName As String DoCmd.OpenForm "frmQueryFGProcessingFacIDsLineIDs" Forms!frmQueryFGProcessingFacIDsLineIDs!cbProfileI D = _ Forms!frmFinishedGoods!cbProfileID DoCmd.OpenForm Me!cbSelectReportRQ, acNormal Exit_cmdGOrpt_Click: Exit Sub Err_cmdGOrpt_Click: MsgBox Err.Description Resume Exit_cmdGOrpt_Click End Sub I hope I've understood properly. When I click the button the form opens however I get the error dialog: MS Access can't find the field 'cbProfileID' referred to in your expression. I click OK to close the dialog and the form is open but NOT filtered to the correct record. This is the first time you've said you want to filter the *form*. Up to this point, you've said repeatedly that you want to filter the combo box (which hasn't made a lot of sense to me). Which is it you want to filter, the form or the combo box? I do see that I made a mistake in the code I posted; I posted this: Forms!frmQueryFGProcessingFacIDsLineIDs!cbProfileI D = _ Forms!frmFinishedGoods!cbProfileID when I meant to post this: Forms!frmQueryFGProcessingFacIDsLineIDs!cbNavigate Profiles = _ Forms!frmFinishedGoods!cbProfileID I'm not sure now whether that's what you want or not, but please fix that and try it again. If it doesn't give you what you want, then I'm guessing you really want to filter the *form*. In that case, please post the recordsource of form "frmQueryFGProcessingFacIDsLineIDs". If it's a table, please give the name of the field that holds the ProfileID value you want to filter by; if it's a query, please post the SQL of the query. -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup) |
#14
|
|||
|
|||
On Open
PERFECT! That works! Sorry - I didn't recognize the typo, either and should
have. As always - Thanks!!! I hope others find this useful. -- www.Marzetti.com "Dirk Goldgar" wrote: "JohnLute" wrote in message I placed the code in the button's click event: Private Sub cmdGOrpt_Click() On Error GoTo Err_cmdGOrpt_Click Dim stDocName As String DoCmd.OpenForm "frmQueryFGProcessingFacIDsLineIDs" Forms!frmQueryFGProcessingFacIDsLineIDs!cbProfileI D = _ Forms!frmFinishedGoods!cbProfileID DoCmd.OpenForm Me!cbSelectReportRQ, acNormal Exit_cmdGOrpt_Click: Exit Sub Err_cmdGOrpt_Click: MsgBox Err.Description Resume Exit_cmdGOrpt_Click End Sub I hope I've understood properly. When I click the button the form opens however I get the error dialog: MS Access can't find the field 'cbProfileID' referred to in your expression. I click OK to close the dialog and the form is open but NOT filtered to the correct record. This is the first time you've said you want to filter the *form*. Up to this point, you've said repeatedly that you want to filter the combo box (which hasn't made a lot of sense to me). Which is it you want to filter, the form or the combo box? I do see that I made a mistake in the code I posted; I posted this: Forms!frmQueryFGProcessingFacIDsLineIDs!cbProfileI D = _ Forms!frmFinishedGoods!cbProfileID when I meant to post this: Forms!frmQueryFGProcessingFacIDsLineIDs!cbNavigate Profiles = _ Forms!frmFinishedGoods!cbProfileID I'm not sure now whether that's what you want or not, but please fix that and try it again. If it doesn't give you what you want, then I'm guessing you really want to filter the *form*. In that case, please post the recordsource of form "frmQueryFGProcessingFacIDsLineIDs". If it's a table, please give the name of the field that holds the ProfileID value you want to filter by; if it's a query, please post the SQL of the query. -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup) |
#15
|
|||
|
|||
On Open
"JohnLute" wrote in message
PERFECT! That works! Sorry - I didn't recognize the typo, either and should have. Ah, very good. I think Albert and I were both thinking you needed something more complicated. As always - Thanks!!! I hope others find this useful. You're welcome. -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup) |
#16
|
|||
|
|||
On Open
I tend to come across as complicated despite the fact that I'm rather
incapable of being so! I thought I described it accurately but I see now where it wasn't. Thanks for your patience and help, guys! -- www.Marzetti.com "Dirk Goldgar" wrote: "JohnLute" wrote in message PERFECT! That works! Sorry - I didn't recognize the typo, either and should have. Ah, very good. I think Albert and I were both thinking you needed something more complicated. As always - Thanks!!! I hope others find this useful. You're welcome. -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup) |
|
Thread Tools | |
Display Modes | |
|
|