Lookup via VBA


A

Abdul Shakeel

I just want to look value from a table on a form through VBA is there any
code available I dont want use query or any other thing
 
B

bcap

Look in Help for the Dlookup function.

I don't wanna give you misleading sample code because you haven't given
enough info (field/table names, criteria, data types)
 
Ad

Advertisements

R

Rob Parker

You can use the dLookup statement in code. See the Help file for full
detail and syntax.

HTH,

Rob
 
Ad

Advertisements

A

Abdul Shakeel

as you say I give you details
I have three tables name tblDeaprtments, tblEmployees, tblPayroll

tbldepartment contains fields
DepartmentID &
DepartmentName

tblEmployess contains fields
EmployeeID,
EmployeeName,
AccountNo.
BasicSalary,
HoseRentAllowance &
ConveyanceAllowance

tblpayoll contains fields
payrollID,
MonthStartDate,
MonthendDate,
EmployeeID,
DepartmentID

I just want to make a form where I first enter a payroll ID month start date
& month end date then I select department ID which automatically updates
Employees in that particular department when I select a particular employee
his Basic salary, House rent Allowance & Conveyance allowance update
automatically with the figures of tblemployees
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top