VBA - my recordset isn't filling up

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TravelingCat
    New Member
    • Feb 2010
    • 82

    VBA - my recordset isn't filling up

    I'm trying to fill up a recordset with the following values:
    Code:
     Set rs = CurrentDb.OpenRecordset 
    ("SELECT assignInCharge, workerEmail from tblAssignments, tblWorkers
    WHERE assignInCharge = workerNum 
    and assignSend = -1 and assignIsSent = 0 
    and assignNum = " & strAssignNum)
    I checked with "If rs.EOF = True Then..." and it indeed is true, meaning rs is empty. These are fields from a subform, and earlier i had another problem, Access couldn't find this subform. So i read that when accessing to subform it should be open so i opened it as hidden, but now the rs is empty..
    Anyone has an idea how i can fix it?
    Thanks in advance!
  • TravelingCat
    New Member
    • Feb 2010
    • 82

    #2
    VBA - my recordset isn't filling up - clarification

    I have a form frmAssignments, and it appears in frmEvents as a subform. I think the problem is that after i opened frmAssignments as hidden in order for the program to run, VB is now working with the frmAssignments as an individual form and not as a subform. I checked it with one field. How do i fix it so vb would reference the frmAssignments as a subform? Maybe the whole OpenForm,,,,,ac Hidden was wrong, but how else would i reference a subform?..

    Comment

    Working...