in Education by
I have two forms: ‘frmClient’, (which has a subform that lists applicants), and ‘frmDisclosure’, which shows details of applicants. On frmClient there is a command button that opens a specified record in frmDisclosure. The procedure is Private Sub Command10_Click() - see below. This works. The problem is that once in frmDisclosure via frmClient, it is not possible to move to another record. The procedure for opening another record in frmDiscloure is in a combobox control: Private Sub ComboFind_AfterUpdate(). This normally works, but it never works if frmDiscloure has been opened via frmClient. I have tried ‘requery’ and ‘refresh’ in various situations, and have tried closing frmClient once frmDisclosure is open. None of this works. If I want to get to a different record, the only solution I have at present is to close frmDisclosure and reopen it. \\\\\\\\\\\\\\\\\\\\\\\\\\\\ Private Sub Command10_Click() If NumForms > 0 Then DoCmd.OpenForm "frmDisclosure" Forms!frmDisclosure.FilterOn = False DoCmd.OpenForm "frmDisclosure", acNormal, "", "[DiscPK]=" & Me.DiscPK, , acNormal Else DisplayMessage ("No form ref for this application.") Exit Sub End If End Sub \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ Private Sub ComboFind_AfterUpdate() Dim rs As Object Set rs = Me.RecordsetClone rs.FindFirst "[DiscPK] = " & Str(Nz(Me![ComboFind], 0)) If Not rs.EOF Then Me.Bookmark = rs.Bookmark End Sub \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
frmDisclosure is opened to a single record, there are no other records to navigate. The RecordsetClone has only one record, so of course code won't find any others. Turn off the filter first: Private Sub ComboFind_AfterUpdate() Me.FilterOn = False With Me.RecordsetClone .FindFirst "[DiscPK] = " & Nz(Me.ComboFind, 0) If Not .NoMatch Then Me.Bookmark = .Bookmark End With End Sub As you can see, declaring and setting a recordset object variable is not required. .EOF would probably work just as well, I have just always used NoMatch. This will set focus to record, not filter the form. If you prefer to display single record, then set the Filter property. Private Sub ComboFind_AfterUpdate() Me.Filter = "DiscPK=" & Nz(Me.ComboFind, 0) End Sub

Related questions

0 votes
    I am new to VBA and I'm trying to create a form in Access where a text box is enabled or ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 5, 2022 in Education by JackTerrance
0 votes
    I am receiving the error "'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine" ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
    Microsoft has chosen to not release a 64-bit version of Jet, their database driver for Access. Does anyone ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 22, 2022 in Education by JackTerrance
0 votes
    Microsoft has chosen to not release a 64-bit version of Jet, their database driver for Access. Does anyone ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 21, 2022 in Education by JackTerrance
0 votes
    A ________ is a computer to which a user doesn't have physical access , which she can access or manipulate ... of computer network. Select the correct answer from above options...
asked Dec 31, 2021 in Education by JackTerrance
0 votes
    Suppose you have some subset of codes with you while working with the SVN and you need to move them from one SVN repo ... to another along with their history, how this can be done?...
asked Feb 18, 2021 in Technology by JackTerrance
0 votes
    Any easy way to move and custom AMI image between regions? (North Virginia -> Singapore) I know you can mess up with ... way to do it? Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    My json-store contains one record. This record is dirty after changing a field and correctly after store. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 11, 2022 in Education by JackTerrance
0 votes
    I started some work on a new feature and after coding for a bit, I decided this feature should be on its ... on the new feature. Select the correct answer from above options...
asked Feb 2, 2022 in Education by JackTerrance
0 votes
    What is the command to pick a commit from a specific branch and move it to another branch? A. Git move commit B. Git cherry-pick C. Git move branch D. None of the options...
asked Dec 24, 2022 in Technology by JackTerrance
0 votes
    The code below copies data from one vector into another. If the vectors are large then I guess this ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 23, 2022 in Education by JackTerrance
0 votes
    The code below copies data from one vector into another. If the vectors are large then I guess this ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 21, 2022 in Education by JackTerrance
0 votes
    How can we move from one desired step to another step? (a) breakpoints (b) System.out.println (c) logger. ... & Servlet of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    I need to move all my work from my branch to another branch, but I'm not sure what is the best solution ... changes on the new branch? Select the correct answer from above options...
asked Jan 19, 2022 in Education by JackTerrance
0 votes
    How can we move from one desired step to another step? (a) breakpoints (b) System.out.println (c ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
...