Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2005

    Unanswered: Procedure for Retrieving data from SQL Tables with VBA

    Hi All;

    I'm new to SQL, the long and short is I am trying to access some data from an SQL Table to use in my VBA Code in my MS Access front-end.

    Here is what I am doing now;

    HSTUHoursPriorPeriods = CDbl(Nz(DLookup("[Hours]", "dbo_TIMS_HSTU_HoursHist_Insync", "[eeLink] =" & EmployeeLink), 0))

    I am accessing data (YTD Hours for a selected employee) through the view "dbo_TIMS_HSTU_HoursHist_Insync" which is connected by ODBC to my application. The result "HSTUHoursPriorPeriods" is used to determine the rate of pay for a specific employee and is run literall each time a user enters a pay record at data entry.

    Because the view itself returns about 1,000 records, before I select the specific record and associated Hours, it is a little slow from a data entry standpoint.

    I understand I can achieve the same result through an SQL Procedure, but
    for the life of me I don't know how.

    ANY thoughts would be greatly appreciated.

  2. #2
    Join Date
    May 2002

Posting Permissions

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