Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Jul 2004
    Thanked 0 Times in 0 Posts

    Fully Qualifying a Field in a Table (Access 2000)

    I need to know the correct syntax for fully qualifying a fireld in a table within VBA.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: Fully Qualifying a Field in a Table (Access 2000)

    It depends on where you want to do this.

    If this is in the code behind a form or report, you can refere to the fields in the record source of the form/report as Me.FieldName. If the field name contains spaces or unusual characters, you must enclose it in square brackets: Me.[Field Name].

    For other situations, you may be able to use a function such as DLookup: DLookup("FieldName", "TableName") or DLookup("FieldName", "TableName", "OtherField = 37")

    And if you want to loop through the records of a table, or if you want to modify the value of a field, you can open a DAO or ADO recordset on the table.

    Note: simply using something like TableName.FieldName will not work in general.

    If you want more assistance, please provide some details of what you want to accomplish.

Posting Permissions

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