Better method than DLOOKUP for form fields? (1 Viewer)

ScottK1396

Registered User.
Local time
Today, 06:10
Joined
Jul 28, 2011
Messages
20
I am building an inventory check form that will display, upon a barcode scan, information from both an asset database and a discovery tool. I'm assuming unique serial numbers for this task (yes, I know, it could blow up, but..).

The purpose is to scan an item, have the form display both the entered and discovered info, and offer options to fix the asset DB record if necessary. I also plan to log the activity.

In a previous app I used DLOOKUP() in a cmdButton.OnClick Sub to populate unbound fields in the form. I have also set field values using a RecordSet.FindFirst method, but IMHO Setting the Form.RecordSource is useless since two sources are being searched, and I'm using Read Only connections.


:confused:My question is, Is there a more efficient way to pull the info from a SQL source, than to issue a dozen or so DLOOKUP commands? Perhaps a RecordSet method, or similar?

Thank you in advance
 

pr2-eugin

Super Moderator
Local time
Today, 11:10
Joined
Nov 30, 2011
Messages
8,494
So what you want is some help working with recordsets? If yes, I normally look back at one of the resource for Recordsets.. Its called "Recordset for Beginners"

If that is not exactly what you were looking for, please provide a bit more information on the process flow, and what you wish to achieve..
 

ScottK1396

Registered User.
Local time
Today, 06:10
Joined
Jul 28, 2011
Messages
20
So what you want is some help working with recordsets? If yes, I normally look back at one of the resource for Recordsets.. Its called "Recordset for Beginners" ..

It looks as if you can use Recordset once, and pull out multiple fields to populate the form, instead of using DLOOKUP multiple times, one for every field...

Thank you for the resource and helping another amatuer.:)
 

Users who are viewing this thread

Top Bottom