Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2002
    Posts
    21

    Unanswered: Moving around a list box

    I have two forms. The first form (Dollar Stream) contains billing address info that the user fills in. The second forms (Missing Data) pops when any billing records have missing data. When a user double clicks on the request id in missing data form, the other form opens and moves to that particular record so it can be fixed.

    Here's the issue. The first form opens and moves to the record but the user can't move to another record in the Saleslist (listbox). The message "critical error" appears. How can I change it? Here is the code on Form One:

    Also, Saleslist is an unbound listbox that contains all request ids entered:

    Private Sub SalesList_Click()
    Dim mSale As Long, rs As Recordset
    On Error GoTo SalesListClickErr
    Set rs = Me.RecordsetClone
    mSale = SalesList
    rs.FindFirst "[Request ID] = " & mSale
    If rs.NoMatch Then
    MsgBox "Critical Error"
    Else
    Me.Bookmark = rs.Bookmark
    End If
    Exit Sub

    Code on form two to open form one and find the request id.

    DoCmd.OpenForm "Dollar Stream", , , "[Request ID]=" & Me.SalesList.Column(0)

    Thanks.

  2. #2
    Join Date
    Nov 2003
    Posts
    1,487
    I'm a little confused as to which form is realy form 1 (Dollar Stream or Missing Data). In any case, I'm pretty sure I get the jest of it.

    Just for the heck of it, try this:

    Code on form two to open form one and find the request id.

    DoCmd.OpenForm "Dollar Stream",,,,,acHidden
    DoCmd.GoToRecord acDataForm,"Dollar Stream",acGoTo, Me.SalesList.Column(0)
    DoCmd.OpenForm "Dollar Stream", acNormal, , , acFormEdit



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •