Hi
Im trying to do a DLookup on the following.
I have a form field called StartDate and i want to find a price from
table where Forms!Formname! StartDate BETWEEN Start2 and End2. I just
cant get the syntax correct at all, theres too many "" all over the
place.
Its the criteria field that i just cant manage to string together. Ive
got something like this:
=DLookUp("Price ","XTEST","Book ingTypeID = " & [Forms]![frmMADBooking]!
[BookingTypeID] & " AND [Start2] '" & [Forms]![frmMADBooking]!
[StartDate] & "'")
This works in a fashion but when adding the between clause instead of
the i just cant figure it out.
Any advice would be great, these quotes are just confusing the hell
out of me.
Mattie 3 1386
Try,
=DLookUp("Price ","XTEST","Book ingTypeID = " & [Forms]![frmMADBooking]!
[BookingTypeID] & " AND “ & “[Start2] #" & [Forms]![frmMADBooking]!
[StartDate] & "#")
Is [Start2] and [Forms]![frmMADBooking]![StartDate] are Dates?
>MattieG wrote: Hi
Im trying to do a DLookup on the following.
I have a form field called StartDate and i want to find a price from table where Forms!Formname! StartDate BETWEEN Start2 and End2. I just cant get the syntax correct at all, theres too many "" all over the place.
Its the criteria field that i just cant manage to string together. Ive got something like this:
=DLookUp("Pric e","XTEST","Boo kingTypeID = " & [Forms]![frmMADBooking]! [BookingTypeID] & " AND [Start2] '" & [Forms]![frmMADBooking]! [StartDate] & "'")
This works in a fashion but when adding the between clause instead of the i just cant figure it out.
Any advice would be great, these quotes are just confusing the hell out of me.
Mattie
--
Message posted via AccessMonster.c om http://www.accessmonster.com/Uwe/For...ccess/200703/1
Yes they are Date fields. I will try that now, thank you.
AccessVandal via AccessMonster.c om wrote:
Try,
=DLookUp("Price ","XTEST","Book ingTypeID = " & [Forms]![frmMADBooking]!
[BookingTypeID] & " AND " & "[Start2] #" & [Forms]![frmMADBooking]!
[StartDate] & "#")
Is [Start2] and [Forms]![frmMADBooking]![StartDate] are Dates?
MattieG wrote:
Hi
Im trying to do a DLookup on the following.
I have a form field called StartDate and i want to find a price from
table where Forms!Formname! StartDate BETWEEN Start2 and End2. I just
cant get the syntax correct at all, theres too many "" all over the
place.
Its the criteria field that i just cant manage to string together. Ive
got something like this:
=DLookUp("Price ","XTEST","Book ingTypeID = " & [Forms]![frmMADBooking]!
[BookingTypeID] & " AND [Start2] '" & [Forms]![frmMADBooking]!
[StartDate] & "'")
This works in a fashion but when adding the between clause instead of
the i just cant figure it out.
Any advice would be great, these quotes are just confusing the hell
out of me.
Mattie
--
Message posted via AccessMonster.c om http://www.accessmonster.com/Uwe/For...ccess/200703/1
Hi Mattie,
You haven't indicated which version of Access you're using but I do know
that Microsoft has a "Domain Function Wizard" available as an add-on for
Access97 for sure. It makes building domain functions very easy, and
displays the result so you can see that it is going to work correctly. Love
it.
You can download it here: http://support.microsoft.com/kb/172183/en-us
HTH,
Don
"MattieG" <ma***********@ hotmail.co.ukwr ote in message
news:11******** **************@ r56g2000hsd.goo glegroups.com.. .
Hi
Im trying to do a DLookup on the following.
I have a form field called StartDate and i want to find a price from
table where Forms!Formname! StartDate BETWEEN Start2 and End2. I just
cant get the syntax correct at all, theres too many "" all over the
place.
Its the criteria field that i just cant manage to string together. Ive
got something like this:
=DLookUp("Price ","XTEST","Book ingTypeID = " & [Forms]![frmMADBooking]!
[BookingTypeID] & " AND [Start2] '" & [Forms]![frmMADBooking]!
[StartDate] & "'")
This works in a fashion but when adding the between clause instead of
the i just cant figure it out.
Any advice would be great, these quotes are just confusing the hell
out of me.
Mattie This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: ogilby1 |
last post by:
when using/writing dlookup the expression should be placed in the control
source field of the properties? under what circumstances is it "put" in the
beforeupdate" or "afterupdate"?
|
by: Ronny Sigo |
last post by:
Hello all,
I already put the same question, only now I have more to tell ...
Although I used this code before in the same routine (only the fieldname of
the table differs) ___ at this point in the code I get the error "You
canceled the previous operation" err msg. When clicking on Help I get a
white screen. I haven't got the slightest idea what it means ....
I pinned down that this error comes from the Dlookup function, because if I
put...
|
by: Kalvin Schroder |
last post by:
I am fairly new to Access, and am trying to put together an invoice
form. The main form in called InvoiceDetailFm. Source is the table
InvoiceDetail and has invoice number, saleman, and CustID as some of
its fields. I have put together a combobox, named it CustID, and am
trying to use DLookup() to bring the complete Customer Name etc onto
the form using DLookup() function for the fields I need. The combobox
will bring up the CustID in...
|
by: Nick J |
last post by:
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("" And "","tblCompanyDetails")
--
|
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...
| |
by: nzyui |
last post by:
Trying to lookup a field from a table called condition this is a separate
table not linked to anything: setup as shown
Code S M L
DG 1 2 3
RI 2 4 5
need a dlookup to give me a single code as in number 1 2 3
all from a form thats entered by user
ie: condition code DG severity L nedd to return 5
cheers
|
by: TerryD |
last post by:
I have a form that has an unbound text field that I am using DLookup in to display the values from a Temp Table. My program calls for me pushing a button to print a report, which runs a query first that overwrites the data in the "Temp Table" that this DLookup is pulling from. Once I have printed the report and return back to the main form the value in the unbound text field with the DLookup still shows the data from the Temp Table that was...
|
by: aharding |
last post by:
Hello!
I am using Access 2003
I have been playing with DLookup all morning and have not been successful yet. I have never used this function...and have some limited experience with code. I will post what I have tried so far and hopefully someone can help me problem solve.
I have tried three different methods... (I know Calculation is spelled wrong..I have to go through my database and fix it everywhere just haven't had the time...
|
by: hrreece |
last post by:
I am trying to use the Dlookup expression in a macro to pull the value from the "Price" field in the following query. The query works fine and the Dlookup function did as well until I added a new field to the "Contracts" table called "ContractYear".
SELECT Contracts.ID, Contracts.Commodity, Contracts.Date, Contracts.ContractYear, Contracts.Option, Contracts., Contracts.Bushels, Contracts.Price, Contracts.
FROM Customer INNER JOIN Contracts...
|
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,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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,...
|
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...
|
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...
|
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();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |