Connecting Tech Pros Worldwide Help | Site Map

DLookup in a datasheet form

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 12th, 2005, 09:23 PM
Knud Rogilds
Guest
 
Posts: n/a
Default 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("SalesName", "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?



  #2  
Old November 12th, 2005, 09:23 PM
Rick Brandt
Guest
 
Posts: n/a
Default Re: DLookup in a datasheet form

"Knud Rogilds" <krogilds@hotmail.com> wrote in message
news:407ffc26$0$275$edfadb0f@dread11.news.tele.dk. ..[color=blue]
> I have tried everything, what am I doing wrong?
>
> I have a data entry form in datasheet view (for mass data entry). One of[/color]
the[color=blue]
> fields are SalesID, and I would like to use DLookup to populate an[/color]
unbound[color=blue]
> field next to it, just for information for the data entry person.
>
> I use:
> strFilter = "SalesRefID = " & Me!Salesid
> Me!Salesnavn = DLookup("SalesName", "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?[/color]

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



 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.