[RESOLVED] Visual Basic for Access
Results 1 to 2 of 2

Thread: [RESOLVED] Visual Basic for Access

  1. #1
    Aquiles Vidal
    Guest

    Resolved [RESOLVED] Visual Basic for Access

    Friends of the technical support:
    I have a problem with the combined box of Access that work
    based on a function of Visual Basic. I use that method because
    is more active than the access query´s. The system should
    give shifts to patient of a clinic and for the assignment
    of schedules it has three tables called Hours, Schedules and
    Doctors, and two forms called Doctors and Subform of Schedules.
    The Subform of Schedules has a combined box that
    choose among M-morning or A-afternoon, and then it has another
    combined box that it should get the morning hours or the
    afternoon according to the previous election. The section
    named acLBGetValue of the function of Visual Basic it gives
    the hours values list of another function based on an
    instruction SELECT, type DAO.Recordset, with a reference to a
    text box, clerk of the first combined box. The problem seems to
    be in the filter WHERE of the SELECT that obtains the value of
    the first combined box that it choose between morning or
    afternoon, because it filters only in the first record,
    and it doesn't work for the other records.
    The instruction function value of the record is this:

    Function ValorDelRegistro(NroRegistro As Integer) As Variant
    Dim Cadena As String
    Dim REC As DAO.RECORDSET
    Let Cadena = "SELECT * FROM Horas WHERE MoA = '" & [Texto1] & "'_
    ORDER BY Horas"
    Set REC = CurrentDb.OpenRecordset(Cadena)
    REC.Move (NroRegistro)
    ValorDelRegistro = REC!Horas
    REC.Close
    End Function

    Thank you to try to help me !!!

  2. #2
    Registered User
    Join Date
    Oct 1999
    Location
    Clackamas, OR USA
    Posts
    5,422

    Post

    Please don't post the same question in more than one forum. Topic continued at:

    http://forums.windrivers.com/cgi-bin...ype=&number=46

    Topic Closed.

    ------------------
    Note to self: Re-index brain cells, database corruption present.

Bookmarks

Posting Permissions

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