mercredi 8 février 2017

MS Access 2013 Dlookup String Criteria issue

Vote count: 0

It seems this problem should have a rather simplistic solution. When trying to run the dlookup for ID, I return a null value when using the RequestNum string. RequestNum is simply an AutoNumber. RequestNum does write to the popup form that is opening up on its own. Also, if i replace RequestNum with the actual number in the field I get the desired returned result. The only help I've been able to find online is that most people did not use '" & stringhere & "' though I obviously am. Any ideas? I'll be happy to supply any additional details if needed. Thanks in advance!

Private Sub lst_AdminDate1_DblClick(Cancel As Integer)
    Dim IDx As String
    Dim RequestNum As String
    DoCmd.OpenForm "Administrative_LeaveCalendar_Detail"
    RequestNum = Me.lst_AdminDate1.Column(2)
    IDx = DLookup("[ID]", "TimeOffCalendar", "[RequestNumber] = '" & RequestNum & "'")
    [Forms]![Administrative_LeaveCalendar_Detail]![txtAdminDateDetail_RN] = RequestNum
    [Forms]![Administrative_LeaveCalendar_Detail]![txtAdminDateDetail_ID] = IDx
    End Sub

asked 39 secs ago

Let's block ads! (Why?)



MS Access 2013 Dlookup String Criteria issue

Aucun commentaire:

Enregistrer un commentaire