Rabu, 08 Mei 2013

[MS_AccessPros] Re: Combo Box Not Working

 

Hi Bob,

Yes, that is what I'm thinking and I've triple checked the BOMID and haven't mispelled that so I'm lost here.

Doyce

--- In MS_Access_Professionals@yahoogroups.com, "Bob" <rcleary171@...> wrote:
>
> Hello Doyce,
>
> Do you believe that the follow lines are failing? (that Me.Bookmark is not being set?)
>
> > rs.FindFirst "[BOMID] = '" & strComboVar & "'"
> > If Not rs.NoMatch Then Me.Bookmark = rs.Bookmark
>
> Usually when my trusted code fails it turns out to be data source related (a misspelled column or missing rows).
>
> Bob
>
>
> --- In MS_Access_Professionals@yahoogroups.com, "dnwinberry" <winberry.doyce@> wrote:
> >
> > Hello Friends,
> >
> > I have a bound form that I set to open without a record showing. I usually select the record from a combo box. However, I can't figure out why this code I've used many times before will not work on this form.
> >
> > Private Sub cboUnitID_AfterUpdate()
> > ' Find the record that matches the control.
> > Dim rs As Object
> > Dim strComboVar As String
> >
> >
> > strComboVar = Me.cboUnitID
> > Debug.Print strComboVar
> > Debug.Print Len(cboUnitID & vbNullString)
> > If Len(cboUnitID & vbNullString) < 0 Then
> > Me.Filter = ""
> > Me.FilterOn = False
> > DoEvents
> > Set rs = Me.Recordset
> > rs.FindFirst "[BOMID] = '" & strComboVar & "'"
> > If Not rs.NoMatch Then Me.Bookmark = rs.Bookmark
> > Set rs = Nothing
> > End If
> >
> > End Sub
> >
> > The form stays filtered at the bottom and I get the correct value and length in the immmediate window when I'm troubleshooting. Could I be missing a reference or something? Nothing appears to happen when I run the code except for what shows up in the immediate window.
> >
> > Doyce
> >
>

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar