473,609 Members | 1,842 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

RunTime error: 3075 - Dlookup Issue dealing with login security

1 New Member
Here is the code that keeps erroring out.
Expand|Select|Wrap|Line Numbers
  1.     If (IsNull(DLookup("EmployeeID", "tbl_EmployeeData", "EmployeeID = '" & Me.txtEmployeeID.Value & "' And password = '" & Me.txtPassword.Value & "'"))) Then
  2.             MsgBox "Invalid UserName or Password!"
  3. Else
  4.         'Verifying the User Security
  5.         UserLevel = DLookup("User Level", "tbl_EmployeeData", "Employee ID = '" & Me.txtEmployeeID.Value & "'")
  6.  
Jul 2 '19 #1
1 870
NeoPa
32,566 Recognized Expert Moderator MVP
You have two lines which contain DLookup() calls but don't make clear which is the one with an issue - or even if both do.

Well, I don't know about line #1, which looks messy enough, but line #5 will certainly fail as you've referred to a field called Employee ID which has a space in it. Either remove the space from the field name or surround it with brackets ([]) in order to convert it to proper SQL format. IE [Employee ID].
Jul 3 '19 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
4585
by: JMCN | last post by:
I have an ftp program that i inherited and i tried to modify it to ftp over my file however, i receive an error message : run-time error '3075 syntax error (missing operator) in query expression " Get PROD6-12-22-03-299-2 c:temp\'PROD6FTCERT.txt 0 As Expr1;'. i'm clueless why i have a missing operator? if anyone has a suggestions that would be greatly appreciated :)
0
1833
by: j.rogel | last post by:
Hello everyone! I am new to this sort of postings so I'm not even sure if this is the correct place to start. Anyway, I would realy appreciate any help. I have a some VBA code that works quite happily in a number of machines and for different users. Recently we had to open a new account for a user in one of the machines and when the code runs it shows a run-time error '3075'. Nonetheless if I switch users in the same machine and run the...
1
1420
by: praveen7576 | last post by:
I get runtime error 3075 whichis followed by Syntax error(missing operator) in query espression while running this query: SqlStr = "SELECT FCLTY.FCLTY_N, FCLTY.ADDR_LINE_1, FCLTY.CITY_N, FCLTY.ST_C, FCLTY.CNTY_N, VEND.VEND_N, VEND.STAT_N, FCLTY.CMNTS" & _ "FROM VEND INNER JOIN (FCLTY INNER JOIN ITEM_VEND_FCLTY ON FCLTY.FCLTY_I = ITEM_VEND_FCLTY.FCLTY_I) ON VEND.VEND_I = ITEM_VEND_FCLTY.VEND_I" Looking for an answer which can be...
5
3473
by: MARTINQC | last post by:
"SELECT ., .Category INTO tblSiteGroupActiveTicketRawData FROM .Base = 'AAAA') OR (.Base = 'BBBB')) AND (.Status != 'Closed');" Above SQL string fails with a runtime error 3075 syntax error (operator missing). I cannot figure this one out. Any assistance would be appreciated.
1
2339
by: BinduKatoch | last post by:
One of the entries in my database has "apostrophe" I have a form in access... When i try to select that entry from the table it gives me error "syntax error(missing expression) in query expression." I tried using double quotes in my query. It displays the entry i am looking for but it messes up the changes i made in delete code. Can anyone help plz....
3
11246
by: adigga1 | last post by:
Hello Experts, I'm about to go grey with this dlookup statement: I'm trying to run a dlookup statement, I have the correct expression string, etc. but when I run it under the Immediate window for testing I'm getting the runtime error. Scanerio: I'm calling an associated Price value (Currency) for a Code (text) from a Query in order to have an auto population in the fields; here is the code:
3
4651
by: timber910 | last post by:
Hello All, I'm in need of help here. I have build my query in a query builder in access as a select query. Query runs fine. Changed it to a make table query. Query makes table ok. Copy and pasted the SQL into my VBA on a form and bam! Run Time error 3075. I've checked and re-checked but I'm not any closer to finguring out where i'm off. If someone could help I would be so grateful! My full code is below. My error message states "Invalid use...
5
1635
by: Vasago | last post by:
I've been having issues with my dlookup. Could someone take a look at this one and let me know where I'm going wrong. tasksE = Nz(DCount("", "Tasks", "To='" & Forms!! & " and Complete=0"), 0)
1
1654
by: kmarkenday | last post by:
I am trying to create a search form in Access where in people can search records by date range. But each time I click search I get a run time error 3075... with DoCmd.ApplyFilter task highlighted. I am new to VBA. Private Sub Command62_Click() ' Search Button Call Search End Sub Sub Search() Dim strCriteria, task As String
3
2663
by: DeltaEchoMikeIT | last post by:
Hi Folks, I keep getting the error when I select a name with an apostraphe, such as in the name "O'Connor" : Run-time error '3075': Syntax error (missing operator) in query expression '(='O'Connor')'. A Debug highlights the line:
0
8083
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,...
0
8573
Oralloy
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...
0
8406
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
7013
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...
1
6062
isladogs
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...
0
5517
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
4091
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1676
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1393
bsmnconsultancy
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...

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.