473,385 Members | 1,843 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Populating form controls using the DLookup function

I am building a database to manage test samples in an environmental
laboratory. I am learning Access as I go and don't know much about
the programming aspects. I hope to make the application user-friendly
for the sample login people by populating form controls. Using the
DLookup function, I am able to populate a form control in one record
using table data. I want to be able to populate multiple records of a
subform control (test parameters) based on a control selection on the
parent form (clients), assuming this is possible. The relationships
between clients and their respective test parameters are established
in a data table. I apologize if this question is redundant.

John
Nov 12 '05 #1
1 3146
John,

You will need to actually add the database records to add your tests
to the subform. The difference here is that in your main form, you
are adding a value to the control with the DLookup function but the
record does not exist. Only when you navigate off the record does
Access create the record. Assuming you have a relationship between
your sample and tests tables, you can not use DLookup to populate test
records without first creating the sample record. Even then, you
would only be able to use DLookup on the first test record (i.e.
before the record exists). You really need to use VBA code to
automatically add the test records as soon as the sample record is
created. That's a pretty common technique in any laboratory
information management system (LIMS). Take a look at the demo on our
web site. It may give you some more ideas on how to approach this
task. HTH

Rick Collard
www.msc-lims.com

On 3 Dec 2003 14:25:25 -0800, jr********@comcast.net (John Hargrove)
wrote:
I am building a database to manage test samples in an environmental
laboratory. I am learning Access as I go and don't know much about
the programming aspects. I hope to make the application user-friendly
for the sample login people by populating form controls. Using the
DLookup function, I am able to populate a form control in one record
using table data. I want to be able to populate multiple records of a
subform control (test parameters) based on a control selection on the
parent form (clients), assuming this is possible. The relationships
between clients and their respective test parameters are established
in a data table. I apologize if this question is redundant.

John


Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: jonvan20 | last post by:
I have been having trouble with a simple Dlookup command that was Reccommended to me by a nice fellow named Vic, On the other hand I have statements like this that wont run they give me a run time...
0
by: nazar | last post by:
How add form control usibg reflection example button or etc The form is creating like in link http://www.thescripts.com/forum/thread224543.html
3
by: sbetancourt | last post by:
Hi, I am making a database that will look up an employee in the main form and in the subform I can see their tasks. The subform is in a datasheet view and it has a combo box that allows you to...
3
by: Birky | last post by:
Can someone please help me with my syntax below? I am trying to enable an object on a form for specific users only and in doing so I am trying to use the DLookUp function to try and keep it sweet and...
4
by: oberon | last post by:
Hi, I am trying to use the function Color.FromArgb(Int32). The Int32 is on the format AARRGGBB, where AA is the alpha component. My problem is that when I want to specify a solid color I need...
5
by: nandithadevaraj | last post by:
Hi, I am working on oracle, frankly speaking till nw i have nt worked in oracle i need help please help me out in this actually i have written query using DLOOKUP function as DLOOKUP...
9
by: dhtml | last post by:
I have written an article "Unsafe Names for HTML Form Controls". <URL: http://jibbering.com/faq/names/ > I would appreciate any reviews, technical or otherwise. Garrett --...
8
by: toadmaster | last post by:
I have a table called users and a field in that table called amountauthorized. My users enter a figure in a text box called estp on a form. estp is either equal to or less than the...
1
by: toadmaster | last post by:
I am trying to use the DLookup function to check a table to see if a user exist in there; if not refuse them access. The following is the code I am using but it seems to just pop up the "Error...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.