473,779 Members | 2,023 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DLookup in a datasheet form

I have tried everything, what am I doing wrong?

I have a data entry form in datasheet view (for mass data entry). One of the
fields are SalesID, and I would like to use DLookup to populate an unbound
field next to it, just for information for the data entry person.

I use:
strFilter = "SalesRefID = " & Me!Salesid
Me!Salesnavn = DLookup("SalesN ame", "SalesIDs", strFilter)

This works fine, but it populates every record in the datasheet with the
same name. How do I address one explicit row in my datasheet?
Nov 12 '05 #1
1 4241
"Knud Rogilds" <kr******@hotma il.com> wrote in message
news:40******** *************@d read11.news.tel e.dk...
I have tried everything, what am I doing wrong?

I have a data entry form in datasheet view (for mass data entry). One of the fields are SalesID, and I would like to use DLookup to populate an unbound field next to it, just for information for the data entry person.

I use:
strFilter = "SalesRefID = " & Me!Salesid
Me!Salesnavn = DLookup("SalesN ame", "SalesIDs", strFilter)

This works fine, but it populates every record in the datasheet with the
same name. How do I address one explicit row in my datasheet?


If you want it to be different "per-row" you cannot assign the value from
code. You need to put the DLookup expression directly into the
ControlSource of the unbound TextBox. Then each row will evaluate the
expression using the value of SalesID found on the same row.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com

Nov 12 '05 #2

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

Similar topics

6
2338
by: JLM | last post by:
What am I missing here? I have a form where I enter a "Class Code". This value corresponds to what sits in table "class code descriptions" along with the "title" of each "class code." Key field is "class code." I want a text box to be populated with the "title" which corresponds to the "class code" which I enter in the form. The control source for the text box is:
1
405
by: Knud Rogilds | last post by:
I have tried everything, what am I doing wrong? I have a data entry form in datasheet view (for mass data entry). One of the fields are SalesID, and I would like to use DLookup to populate an unbound field next to it, just for information for the data entry person. I use: strFilter = "SalesRefID = " & Me!Salesid Me!Salesnavn = DLookup("SalesName", "SalesIDs", strFilter)
3
3178
by: Tripp Knightly | last post by:
I have a lookup table from which I want to categorize various bands of customer net income. Some of the income is positive, some is negative. The bands vary in size (ie, <500, -200 to 0, 100 to 1000). When I have a lookup table w/ the "threshold" amounts of income, I'm not able to get dlookup to work, and I'm pretty sure it's getting tripped up by negative / positive lookup values. Is it not possible to do lookups on a table w/ both...
6
2516
by: Lars-Ove Andersson | last post by:
I have problem with the command "DLookup" in Access 2000. The command takes very long time to run. Have anybody any solution for this. //LOA
6
508
by: Don Sealer | last post by:
I've written this expression for a DLookup function. It works almost alright. What I'm trying to do is type in a description and the ID field (number) populates automatically. It works almost as I've said. It doesn't populate until I go to a new record. Then if I go back to the record the number is in the field. Instead of populating immediately it waits until I've created a new record. Am I making sense with this description. Here's...
3
2580
by: jadixon | last post by:
I have created a combo box on a datasheet view form that does 2 things: it uses a dlookup to get the initial data (an employee name) then it has a row source to a query. The strange thing that happens is that when I open the form, the first name appears, and all subsequent records have missing entries (the rest of the data does show up). When I either click the mouse anywhere or hit any key, the remainder of the names magically appear. I...
3
3708
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 select the task and then the adjacent text boxs fill up using the DLookUp function. I can't seem to make the DLookUp code work. I have =DLookUP ("Field", "Table") What else does this code need to work? Any help is appreciated. Thank you...
5
4823
by: hrreece | last post by:
I have a form, Master List Temp, in Access 2003 that uses the Dlookup command to pull values from another table, Address Master. The user types in a person's home phone number in the HomePhone field on the form and the command looks up information in the Address Master table pertaining to the First Name, Last Name, etc. that match the HomePhone number criteria This allows the user to see if information for the account already exists. The...
2
3158
by: Alan Forsyth | last post by:
That rather long subject says it. In Access97 running on XP - I want to display a Maximized size Form01, then open a Restore size Datasheet View Form02 on top of the first Form. PopUp won't give me Datasheet view. Dialog mode won't give me Datasheet view I could make Form01 Restore size and expand it to fill the Window in Restore size (maybe DoCmd.MoveSize Right, Down, Width, Height) - I don't want this.
15
3129
by: rleepac | last post by:
This is a little complicated but I'll do my best to explain. In my db I have a table called L_AgeCorrection which has the following fields: Age, Sex, Frequency, AgeValue This is a table used to assign an Age Correction value to hearing test results - since some degree of hearing loss naturally occurs with aging - OSHA lets us calculate that in before determining if the employee has an actual "significant" hearing loss. Anyway...I have my...
0
9632
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9471
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10071
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9925
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8958
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6723
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5372
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4036
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3631
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.