Hi,
I want t display several fields in one label box using the DLookUp function.
I have tried using below but all I get is '-1' when I preview the report.
Any idea's?
=DLookUp("[Company Name]" And "[Address 1]","tblCompanyDetails")
--
Kind Regards...
Customer Services Team
Blue Bell Trading
+++ WHEN REPLYING PLEASE DO NOT DELETE ANY OF THE TEXT AS WE NEED IT FOR
REFERENCE +++
Blue Bell Trading 11 2829
"Nick J" <bl*************@blueyonder.co.uk> wrote in message
news:UG*****************@fe3.news.blueyonder.co.uk ... Hi,
I want t display several fields in one label box using the DLookUp function. I have tried using below but all I get is '-1' when I preview the report. Any idea's?
=DLookUp("[Company Name]" And "[Address 1]","tblCompanyDetails")
--
Kind Regards...
Customer Services Team Blue Bell Trading
+++ WHEN REPLYING PLEASE DO NOT DELETE ANY OF THE TEXT AS WE NEED IT FOR REFERENCE +++
Blue Bell Trading
I'm not sure that DLookup can be used in this manner. Why not concatenate
the fields in a query and do the DLookup on that?
Regards,
Keith. www.keithwilby.com
"Nick J" <bl*************@blueyonder.co.uk> wrote in message
news:UG*****************@fe3.news.blueyonder.co.uk ... Hi,
I want t display several fields in one label box using the DLookUp function. I have tried using below but all I get is '-1' when I preview the report. Any idea's?
=DLookUp("[Company Name]" And "[Address 1]","tblCompanyDetails")
I suppose you want to get the Company Name
together with their address.
If so try:
=DLookUp("[Company Name]","tblCompanyDetails") & " " & DLookUp("[Address
1]","tblCompanyDetails")
Bruno
On Fri, 22 Apr 2005 09:43:16 GMT, Nick J wrote: Hi,
I want t display several fields in one label box using the DLookUp function. I have tried using below but all I get is '-1' when I preview the report. Any idea's?
=DLookUp("[Company Name]" And "[Address 1]","tblCompanyDetails")
A DlookUp can only returen the value of 1 field.
Is the Company and Address your company, or is it one of many
companies?
If it is your comapnay name and address, then use:
=DLookUp("[CompanyName]","tblCompanyDetails") & chr(13) & chr(10) &
DLookUp ("[Address]","tblCompanyDetails")
Bell Company
123 Some Street
If you wish it all on one line then replace the chr(13) & chr(10) with
" " (see the next example below).
However, if the company is one of several companies in the table, you
need to use criteria to get the correct one.
=DLookUp("[CompanyName]","tblCompanyDetails","[CompanyID] = " &
someCriteria) & " " &
DLookUp("[Address]","tblCompanyDetails","[CompanyID] = " & Some
Criteria)
Joe Blow Inc. 123 Some street
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nick J wrote: Hi,
I want t display several fields in one label box using the DLookUp function. I have tried using below but all I get is '-1' when I preview the report. Any idea's?
=DLookUp("[Company Name]" And "[Address 1]","tblCompanyDetails")
You're doing a Boolean expression there m8 :-)
Try
=DLookUp("[Company Name] & ' ' & [Address 1]","tblCompanyDetails")
If that don't work then try my replacement domain functions
( http://easyweb.easynet.co.uk/~trevor.../baslookup.zip) as
that'll have no problem with this syntax:
=tLookUp("[Company Name] & ' ' & [Address 1]","tblCompanyDetails")
--
[Oo=w=oO]
"Trevor Best" <no****@besty.org.uk> wrote in message
news:42**********************@news.zen.co.uk... Try =DLookUp("[Company Name] & ' ' & [Address 1]","tblCompanyDetails")
It can't work!
Bruno
Bruno Campanini wrote: "Trevor Best" <no****@besty.org.uk> wrote in message news:42**********************@news.zen.co.uk...
Try =DLookUp("[Company Name] & ' ' & [Address 1]","tblCompanyDetails")
It can't work!
I wouldn't know, I've never tried it in DLookup() that's why I
recommended tLookup(), which will work like that.
--
[Oo=w=oO]
"Nick J" <bl*************@blueyonder.co.uk> wrote in message
news:UG*****************@fe3.news.blueyonder.co.uk ... Hi,
I want t display several fields in one label box using the DLookUp
function. I have tried using below but all I get is '-1' when I preview the report. Any idea's?
=DLookUp("[Company Name]" And "[Address 1]","tblCompanyDetails")
--
Kind Regards...
Customer Services Team Blue Bell Trading
+++ WHEN REPLYING PLEASE DO NOT DELETE ANY OF THE TEXT AS WE NEED IT FOR REFERENCE +++
Blue Bell Trading
Build up the string just as you would in a query
DLookUp("[Company Name] & """ """ & [Address 1]","tblCompanyDetails")
Bruno Campanini wrote: "Trevor Best" <no****@besty.org.uk> wrote in message news:42**********************@news.zen.co.uk...
Try =DLookUp("[Company Name] & ' ' & [Address 1]","tblCompanyDetails")
It can't work!
Actually I just tried it in my test database:
<------
?Dlookup("[ID] & ' ' & [Wibble]","Table1")
5 gggg
------->
--
[Oo=w=oO]
"Trevor Best" <no****@besty.org.uk> wrote in message
news:42**********************@news.zen.co.uk... Bruno Campanini wrote: "Trevor Best" <no****@besty.org.uk> wrote in message news:42**********************@news.zen.co.uk...
Try =DLookUp("[Company Name] & ' ' & [Address 1]","tblCompanyDetails")
It can't work!
Actually I just tried it in my test database:
<------ ?Dlookup("[ID] & ' ' & [Wibble]","Table1") 5 gggg
Yes, indeed!
I tried something like "[ID]" & " " & "[Wibble]" and
Access is unable to read two fields this way.
I'd never suppose it could do it your way.
But it does!
Surprise in Access is a never-ending story.
Bruno
Thats worked great, thanks for all your help.
--
Kind Regards...
Customer Services Team
Blue Bell Trading
+++ WHEN REPLYING PLEASE DO NOT DELETE ANY OF THE TEXT AS WE NEED IT FOR
REFERENCE +++
Blue Bell Trading
"fredg" <fg******@example.invalid> wrote in message
news:1n******************************@40tude.net.. . On Fri, 22 Apr 2005 09:43:16 GMT, Nick J wrote:
Hi,
I want t display several fields in one label box using the DLookUp function. I have tried using below but all I get is '-1' when I preview the report. Any idea's?
=DLookUp("[Company Name]" And "[Address 1]","tblCompanyDetails")
A DlookUp can only returen the value of 1 field. Is the Company and Address your company, or is it one of many companies?
If it is your comapnay name and address, then use: =DLookUp("[CompanyName]","tblCompanyDetails") & chr(13) & chr(10) & DLookUp ("[Address]","tblCompanyDetails")
Bell Company 123 Some Street
If you wish it all on one line then replace the chr(13) & chr(10) with " " (see the next example below).
However, if the company is one of several companies in the table, you need to use criteria to get the correct one. =DLookUp("[CompanyName]","tblCompanyDetails","[CompanyID] = " & someCriteria) & " " & DLookUp("[Address]","tblCompanyDetails","[CompanyID] = " & Some Criteria)
Joe Blow Inc. 123 Some street -- Fred Please only reply to this newsgroup. I do not reply to personal email.
Sorry is sent this direct to Nick J
Prehaps a Text box may be better
Try =DLookUp("[Company Name]" ,tblCompanyDetails") & " " & DLookUp(
"[Address 1]","tblCompanyDetails")
This assumes u have only 1 record in tblCompanyDetails or U want the first
Record in the current sort order
If U want on 2 lines then insert vbcrlf instead " "
--
Murray Carter
"Nick J" <bl*************@blueyonder.co.uk> wrote in message
news:UG*****************@fe3.news.blueyonder.co.uk ... Hi,
I want t display several fields in one label box using the DLookUp
function. I have tried using below but all I get is '-1' when I preview the report. Any idea's?
=DLookUp("[Company Name]" And "[Address 1]","tblCompanyDetails")
--
Kind Regards...
Customer Services Team Blue Bell Trading
+++ WHEN REPLYING PLEASE DO NOT DELETE ANY OF THE TEXT AS WE NEED IT FOR REFERENCE +++
Blue Bell Trading
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: KLAU |
last post by:
I have a field that retrieves information from an expression in a
query. I have used a DLookup function to get the calculated field
from the query. However, the relationship is 1-to-many so one...
|
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...
|
by: MLH |
last post by:
I have tried using DLookUp in this manner...
If DLookUp("","tblClients","='2021234567'") Then
MsgBox "Found it!"
End If
I am wondering if that is a misuse of the DLookUp command?
Type...
|
by: ctyrrell |
last post by:
I have read with interest the many discussions of the 3048 Error:
Cannot open any more databases. I understand how the number of open
Table ID's causes the problem. My question has to do with the...
|
by: Christine Henderson |
last post by:
I have a problem using the above function in the following simplified
circumstance:
In the lookup table called "Klms Travelled" I have 3 fields, eg:
Receiver Name Receiver Suburb ...
|
by: MLH |
last post by:
DLookup("", "tblPreliminaryVINs",
"=Forms!frmVINODO!SerialNum")
is giving me a Type Mismatch error. That's confusing to me
and I don't know how to circumvent it. The field in...
|
by: Don |
last post by:
Can someone help me fix my DLookup problem. I'm far from proficiency with
Access. I've been creating databases for several years for work with the
help of many of you and trial and error.
I have...
|
by: |
last post by:
In my database I have a 'control table' in which basic info is stored about the application, for instance the application's path and the name of the company that is using it. In all of the...
|
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...
|
by: JDaly |
last post by:
This bombs on the StPL= line. I want it to look up a string value from a table with a criterion of matching another string. In immediate mode the form evaluates correctly with ? Form!! as TEST but...
|
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...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
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...
|
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$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
| |