Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    361

    Unanswered: Unique Identifier Code

    Does anyone know what a Unique Identifier is, and how it pertains to this code?

    Private Sub Command149_Click()
    On Error GoTo Err_Command149_Click

    Dim stDocName As String, strWhere As String
    DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

    stDocName = "Term Worksheet Report"
    strWhere = "[WorksheetNo]=" & Me!WorksheetNo
    '** Replace WorksheetNo with your unique identifier **
    DoCmd.OpenReport stDocName, acPreview, , strWhere
    DoCmd.Close acForm, "Term Worksheet"

    Exit_Command149_Click:
    Exit Sub

    Err_Command149_Click:
    MsgBox Err.Description
    Resume Exit_Command149_Click

    End Sub

  2. #2
    Join Date
    Jul 2004
    Posts
    67
    I'm assuming you've copied this code from somewhere and the writer is giving the instruction to replace Me!WorksheetNo with Me!YourFieldName.

  3. #3
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    usualy a table's unique identifier is the primary key field.
    ghozy.

Posting Permissions

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