Error with opening navigation subform to SPECIFIC recordUpdate records in subform powered by joined tablesAdd an existing record from a mainform to a subform when you click on the save buttonField names in Access subform populated with vba recordsetMS Access Referencing a Field in a Subform with multiple RecordsDoCmd.OpenForm Issue in 'Where' ClauseError 3251 when setting record source for subformReference a Subform in a SubformMS Access Event Model - Intercept Record WriteSort form when opening based on previous form criteriaMove to another record via combobox doesn't work in some circumstances

Drawing ramified coverings with tikz

Proving a function is onto where f(x)=|x|.

Is it possible to have a strip of cold climate in the middle of a planet?

Why does Async/Await work properly when the loop is inside the async function and not the other way around?

Engineer refusing to file/disclose patents

Is a model fitted to data or is data fitted to a model?

How must one send away the mother bird?

Drawing a topological "handle" with Tikz

Should I install hardwood flooring or cabinets first?

Open a doc from terminal, but not by its name

Is it improper etiquette to ask your opponent what his/her rating is before the game?

If a character with the Alert feat rolls a crit fail on their Perception check, are they surprised?

Is there a conventional notation or name for the slip angle?

Database accidentally deleted with a bash script

How to decide convergence of Integrals

What major Native American tribes were around Santa Fe during the late 1850s?

Can we have a perfect cadence in a minor key?

Why did the EU agree to delay the Brexit deadline?

Greco-Roman egalitarianism

How will losing mobility of one hand affect my career as a programmer?

Why is Arduino resetting while driving motors?

Why did the HMS Bounty go back to a time when whales are already rare?

Varistor? Purpose and principle

What is the difference between "Do you interest" and "...interested in" something?



Error with opening navigation subform to SPECIFIC record


Update records in subform powered by joined tablesAdd an existing record from a mainform to a subform when you click on the save buttonField names in Access subform populated with vba recordsetMS Access Referencing a Field in a Subform with multiple RecordsDoCmd.OpenForm Issue in 'Where' ClauseError 3251 when setting record source for subformReference a Subform in a SubformMS Access Event Model - Intercept Record WriteSort form when opening based on previous form criteriaMove to another record via combobox doesn't work in some circumstances













0















I am trying to open a navigation subform to a specific record. Below is my code.



  • List_22 is displaying tblMainDERS.


  • Reference Number is a string. Reference Number exists in tblMainDERS and tblMCV


  • frmMCV is displaying tblMCV. (I tried using tblMCV.[Reference Number] = RefNum, but that does not work either)


Everything works EXCEPT for the where statement in the BrowseTo line. My form opens to frmMCV in the navigation pane of frmERS, but displays the first record in the table, instead of the one specified by the reference number.



Private Sub List22_DblClick(Cancel As Integer)
If Not IsNull(Me.List22.Column(0)) Then
RefNum = Me.List22.Column(0)
Application.Echo False
DoCmd.OpenForm "frmERS", , , ("tblMainDERS.[Reference Number]= '" & RefNum & "'")
DoCmd.BrowseTo acBrowseToForm, "frmMCV", "frmERS.NavigationSubform", ("tblMainDERS.[Reference Number] = '" & RefNum & "'")
Application.Echo True
End If
End Sub


Any help would be appreciated.










share|improve this question









New contributor




kjadbgnkadbg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Do the openargs work ok in the previous line? also, you say frmMCV is displaying tblMCV. but your criteria is tblMainDERS.[Reference Number] ?

    – Nathan_Sav
    Mar 21 at 14:03












  • The previous line works flawlessly. When I enter tblMCV.[Reference Number] = RefNum, a pop up appears asking for the parameter after a DblClk on the list box

    – kjadbgnkadbg
    Mar 21 at 14:10











  • Can you add some screen shots of these values, just a screen grab of the table column, to show some values, so people can try to replicate. One thing, there are no autofilters/opening code etc on the form you are trying to open that could interfere?

    – Nathan_Sav
    Mar 21 at 15:04















0















I am trying to open a navigation subform to a specific record. Below is my code.



  • List_22 is displaying tblMainDERS.


  • Reference Number is a string. Reference Number exists in tblMainDERS and tblMCV


  • frmMCV is displaying tblMCV. (I tried using tblMCV.[Reference Number] = RefNum, but that does not work either)


Everything works EXCEPT for the where statement in the BrowseTo line. My form opens to frmMCV in the navigation pane of frmERS, but displays the first record in the table, instead of the one specified by the reference number.



Private Sub List22_DblClick(Cancel As Integer)
If Not IsNull(Me.List22.Column(0)) Then
RefNum = Me.List22.Column(0)
Application.Echo False
DoCmd.OpenForm "frmERS", , , ("tblMainDERS.[Reference Number]= '" & RefNum & "'")
DoCmd.BrowseTo acBrowseToForm, "frmMCV", "frmERS.NavigationSubform", ("tblMainDERS.[Reference Number] = '" & RefNum & "'")
Application.Echo True
End If
End Sub


Any help would be appreciated.










share|improve this question









New contributor




kjadbgnkadbg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Do the openargs work ok in the previous line? also, you say frmMCV is displaying tblMCV. but your criteria is tblMainDERS.[Reference Number] ?

    – Nathan_Sav
    Mar 21 at 14:03












  • The previous line works flawlessly. When I enter tblMCV.[Reference Number] = RefNum, a pop up appears asking for the parameter after a DblClk on the list box

    – kjadbgnkadbg
    Mar 21 at 14:10











  • Can you add some screen shots of these values, just a screen grab of the table column, to show some values, so people can try to replicate. One thing, there are no autofilters/opening code etc on the form you are trying to open that could interfere?

    – Nathan_Sav
    Mar 21 at 15:04













0












0








0








I am trying to open a navigation subform to a specific record. Below is my code.



  • List_22 is displaying tblMainDERS.


  • Reference Number is a string. Reference Number exists in tblMainDERS and tblMCV


  • frmMCV is displaying tblMCV. (I tried using tblMCV.[Reference Number] = RefNum, but that does not work either)


Everything works EXCEPT for the where statement in the BrowseTo line. My form opens to frmMCV in the navigation pane of frmERS, but displays the first record in the table, instead of the one specified by the reference number.



Private Sub List22_DblClick(Cancel As Integer)
If Not IsNull(Me.List22.Column(0)) Then
RefNum = Me.List22.Column(0)
Application.Echo False
DoCmd.OpenForm "frmERS", , , ("tblMainDERS.[Reference Number]= '" & RefNum & "'")
DoCmd.BrowseTo acBrowseToForm, "frmMCV", "frmERS.NavigationSubform", ("tblMainDERS.[Reference Number] = '" & RefNum & "'")
Application.Echo True
End If
End Sub


Any help would be appreciated.










share|improve this question









New contributor




kjadbgnkadbg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I am trying to open a navigation subform to a specific record. Below is my code.



  • List_22 is displaying tblMainDERS.


  • Reference Number is a string. Reference Number exists in tblMainDERS and tblMCV


  • frmMCV is displaying tblMCV. (I tried using tblMCV.[Reference Number] = RefNum, but that does not work either)


Everything works EXCEPT for the where statement in the BrowseTo line. My form opens to frmMCV in the navigation pane of frmERS, but displays the first record in the table, instead of the one specified by the reference number.



Private Sub List22_DblClick(Cancel As Integer)
If Not IsNull(Me.List22.Column(0)) Then
RefNum = Me.List22.Column(0)
Application.Echo False
DoCmd.OpenForm "frmERS", , , ("tblMainDERS.[Reference Number]= '" & RefNum & "'")
DoCmd.BrowseTo acBrowseToForm, "frmMCV", "frmERS.NavigationSubform", ("tblMainDERS.[Reference Number] = '" & RefNum & "'")
Application.Echo True
End If
End Sub


Any help would be appreciated.







vba ms-access access-vba






share|improve this question









New contributor




kjadbgnkadbg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




kjadbgnkadbg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited yesterday









Lee Mac

5,41131643




5,41131643






New contributor




kjadbgnkadbg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Mar 21 at 13:50









kjadbgnkadbgkjadbgnkadbg

31




31




New contributor




kjadbgnkadbg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





kjadbgnkadbg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






kjadbgnkadbg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • Do the openargs work ok in the previous line? also, you say frmMCV is displaying tblMCV. but your criteria is tblMainDERS.[Reference Number] ?

    – Nathan_Sav
    Mar 21 at 14:03












  • The previous line works flawlessly. When I enter tblMCV.[Reference Number] = RefNum, a pop up appears asking for the parameter after a DblClk on the list box

    – kjadbgnkadbg
    Mar 21 at 14:10











  • Can you add some screen shots of these values, just a screen grab of the table column, to show some values, so people can try to replicate. One thing, there are no autofilters/opening code etc on the form you are trying to open that could interfere?

    – Nathan_Sav
    Mar 21 at 15:04

















  • Do the openargs work ok in the previous line? also, you say frmMCV is displaying tblMCV. but your criteria is tblMainDERS.[Reference Number] ?

    – Nathan_Sav
    Mar 21 at 14:03












  • The previous line works flawlessly. When I enter tblMCV.[Reference Number] = RefNum, a pop up appears asking for the parameter after a DblClk on the list box

    – kjadbgnkadbg
    Mar 21 at 14:10











  • Can you add some screen shots of these values, just a screen grab of the table column, to show some values, so people can try to replicate. One thing, there are no autofilters/opening code etc on the form you are trying to open that could interfere?

    – Nathan_Sav
    Mar 21 at 15:04
















Do the openargs work ok in the previous line? also, you say frmMCV is displaying tblMCV. but your criteria is tblMainDERS.[Reference Number] ?

– Nathan_Sav
Mar 21 at 14:03






Do the openargs work ok in the previous line? also, you say frmMCV is displaying tblMCV. but your criteria is tblMainDERS.[Reference Number] ?

– Nathan_Sav
Mar 21 at 14:03














The previous line works flawlessly. When I enter tblMCV.[Reference Number] = RefNum, a pop up appears asking for the parameter after a DblClk on the list box

– kjadbgnkadbg
Mar 21 at 14:10





The previous line works flawlessly. When I enter tblMCV.[Reference Number] = RefNum, a pop up appears asking for the parameter after a DblClk on the list box

– kjadbgnkadbg
Mar 21 at 14:10













Can you add some screen shots of these values, just a screen grab of the table column, to show some values, so people can try to replicate. One thing, there are no autofilters/opening code etc on the form you are trying to open that could interfere?

– Nathan_Sav
Mar 21 at 15:04





Can you add some screen shots of these values, just a screen grab of the table column, to show some values, so people can try to replicate. One thing, there are no autofilters/opening code etc on the form you are trying to open that could interfere?

– Nathan_Sav
Mar 21 at 15:04












1 Answer
1






active

oldest

votes


















0














Just use fieldname and parameter in the WHERE argument.



Simply: "[Reference Number]='" & RefNum & "'"






share|improve this answer






















    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );






    kjadbgnkadbg is a new contributor. Be nice, and check out our Code of Conduct.









    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55281964%2ferror-with-opening-navigation-subform-to-specific-record%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Just use fieldname and parameter in the WHERE argument.



    Simply: "[Reference Number]='" & RefNum & "'"






    share|improve this answer



























      0














      Just use fieldname and parameter in the WHERE argument.



      Simply: "[Reference Number]='" & RefNum & "'"






      share|improve this answer

























        0












        0








        0







        Just use fieldname and parameter in the WHERE argument.



        Simply: "[Reference Number]='" & RefNum & "'"






        share|improve this answer













        Just use fieldname and parameter in the WHERE argument.



        Simply: "[Reference Number]='" & RefNum & "'"







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 21 at 21:49









        June7June7

        5,43151227




        5,43151227






















            kjadbgnkadbg is a new contributor. Be nice, and check out our Code of Conduct.









            draft saved

            draft discarded


















            kjadbgnkadbg is a new contributor. Be nice, and check out our Code of Conduct.












            kjadbgnkadbg is a new contributor. Be nice, and check out our Code of Conduct.











            kjadbgnkadbg is a new contributor. Be nice, and check out our Code of Conduct.














            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55281964%2ferror-with-opening-navigation-subform-to-specific-record%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

            155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해