Can any one please tell me the syntax is correct
Me.List17=DLook Up(["Equipment1 "],["tbl_EquipmentC hronology"],["TicketNum]="[
& tbl_Events.Tick etNum & ]" And [Outlet]="[ &
tbl_Events.PPVV OD_Outlet &])
Thanks, 2 1362
Eric wrote:
Can any one please tell me the syntax is correct
Me.List17=DLook Up(["Equipment1 "],["tbl_EquipmentC hronology"],["TicketNum]="[
& tbl_Events.Tick etNum & ]" And [Outlet]="[ &
tbl_Events.PPVV OD_Outlet &])
Thanks,
no its not, try this
Me.List17=DLook Up("[Equipment1]", _
"tbl_EquipmentC hronology", "[TicketNum] ='" _
& tbl_Events.Tick etNum & "' And [Outlet]='" _
& tbl_Events.PPVV OD_Outlet & "'")
The square brackets are not right.
Try this kind of thing:
Me.List17 = DLookUp("Equipm ent1", "tbl_EquipmentC hronology",
"[TicketNum] = " & [TicketNum] & " And [Outlet] = " & [PPVVOD_Outlet])
That need extra quotes if TickeNum or Outlet are Text fields.
For an explanation, see:
Getting a value from a table: DLookup()
at: http://allenbrowne.com/casu-07.html
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Eric" <eh******@gmail .comwrote in message
news:11******** *************@h 48g2000cwc.goog legroups.com...
Can any one please tell me the syntax is correct
Me.List17=DLook Up(["Equipment1 "],["tbl_EquipmentC hronology"],["TicketNum]="[
& tbl_Events.Tick etNum & ]" And [Outlet]="[ &
tbl_Events.PPVV OD_Outlet &])
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: jwa6 |
last post by:
syntax for a dlookup
ok I give up!
here is the error...
' Run-time error 3075 Syntax error in query expression '...'
this is the code before that a contractor wrote.
(I dont know if it ever worked....the table was wrong however)
|
by: Tony Ciconte |
last post by:
I am using Acc97 and trying to get the following instruction to work
in the OnOpen event of a report:
DLookup("", "tblTempRevenueByFY", DatePart("m", ) =
1)
The table tblTempRevenueByFY exists, with data, as do the fields
"GiftAmt" and "GiftDate". However, when I try to preview the report, I
get 2465 error that says it cannot find the field "GiftDate". I have
tried every combination of quotes, double-quotes, parentheses, etc.
|
by: Tony |
last post by:
Hi,
I have a table with two primary keys as below.
Table: Mouse
Primary key 1: MouseLine
Primary key 2: MouseNumber
Field 3: DateOfBirth
In a particular form, if I know MouseLine and MouseNumber, can I use
|
by: shifty shaker |
last post by:
I've modified sql text and now i'm getting a syntax error that I cannot
figure out....anyone?
error occurs at the Insert Into line but the entire function is given in
case you need it.
---
Function ThisIs()
Dim TDate As Date, C1 As Integer, StrSQL As String, TypeAttend, RecDetect
If Not IsNull(Me.scrStudent) Then
C1 = 1: TDate = Me!
|
by: Diana |
last post by:
I thought I had this process pretty well down pat, but I'm getting a
syntax error on the following code:
*****Code*****
'Check for users - can't get this to work...
Dim strUser As String
strUser = WUserName()
If IsNull(DLookup("Permitted", "tblUsers", "Permitted = '" &
| |
by: MLH |
last post by:
If Not IsNull(DLookup("", "tblCars", "=GetCurrVID()")) Then
If DLookup("", "tblCars", "=GetCurrVID()") Then
Of the above 2 syntax variations, is the 2nd unacceptable? I use the
former because I seem to remember suggestions in this forum that
discouraged the latter. But I tire of it. To me, the latter is more
readily understood because there's no double negative to deal with.
|
by: injanib via AccessMonster.com |
last post by:
Hello Access Monsters,
I have a table with three columns. "CostCenter", "ProjectNumber", "GLCode"
On my form I have three texboxes, "txtCostCenter", "txtProjectNumber" and
"txtGLCode".
the AfterUpdate event of the txtCostCenter runs the following code.
Me.txtProjectNumber = DLookup("ProjectNumber", "tblList", "CostCenter =" & Me.
txtCostCenter)
Me.txtGLCode = DLookup("GLCode", "tblList", "CostCenter =" & Me.txtCostCenter)
|
by: Bhujanga |
last post by:
I have a form called BasicInfo.
On the form there is a field called text box called "County Name" and a ComboBox called "County Code"
There is a table called "CountyCodes" that has two fields; they are "County Code" and "County Name"
The combo box allows you to pick a county from a list tied to the "County Codes" table, and stores the "County Code" in the ComboBox field.
I want it to then automatically put the county name into the "County...
|
by: rolltide |
last post by:
I've seen many similar threads, but despite repeated efforts I cannot figure out my problem. I am running Access 2003, VB 6.5, Office XP Pro. Code excerpt is below (you can see where I've tried debugging myself). My problem is in the DLookup command.
UserName = Me.cboUserName.Value
Debug.Print "User Name is "; UserName
strPassword = DLookup("Password", "Employees", "EmpName ='" & UserName)
Debug.Print "Password is ";...
|
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: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |