473,405 Members | 2,294 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Syntax Error 3075

I can not seem to get rid of this syntax error - hope someone can help out.
the error I am getting is:

Run time Error 3075
Syntax error missing operator in query expression
[AcctHolderID]=name

I have two forms (1) one with a combo box "cbobankacct" on form "accttransactionlist"

I am successful to have the value from the combo box generate into a text box of a second form.

second form "accttranslistpassword" and the text box that I am trying to generate the value into is "txtacctholder.

the value seems to imput in the text box fine but I get the syntax error when I try to run the password script.

Expand|Select|Wrap|Line Numbers
  1. Private Sub cbobankacct_AfterUpdate()
  2.    DoCmd.OpenForm "AcctTransListPassword"
  3.    Forms!AcctTransListPassword!txtacctholder = Forms!AcctTransactionList!cbobankacct.Column(1)
  4.  
  5. End Sub
I then have a text box "txtpassword" that I input the password into and that is when I get the syntax error

Expand|Select|Wrap|Line Numbers
  1. Private Sub txtpassword_AfterUpdate()
  2.  
  3.     If IsNull(Me.txtpassword) Or Me.txtpassword = "" Then
  4.       MsgBox "You must enter a Password.", vbOKOnly, "Required Data"
  5.         Me.txtpassword.SetFocus
  6.         Exit Sub
  7.     End If
  8.  
  9.     If Me.txtpassword.value = DLookup("Password", "AcctHolder", _
  10.             "[AcctHolderID]=" & Me.txtacctholder.value) Then
  11.  
  12.         MyAcctHolderID = Me.txtacctholder.value
  13.  
  14.         DoCmd.Close acForm, "AcctTransListPassword", acSaveNo
  15.         DoCmd.RunMacro "AcctHolderMDB"
  16.  
  17.     Else
  18.       MsgBox "Password Invalid. Please Try Again", vbOKOnly, _
  19.             "Invalid Entry!"
  20.         Me.txtpassword.SetFocus
  21.     End If
  22.  
  23.  
  24. End Sub
If anyone can give me some direction that would be great! Everyone on this site has always been very helpful in the past.
Thanks
Gary
Feb 28 '10 #1
2 2968
ADezii
8,834 Expert 8TB
If "[AcctHolderID] is a String, then you would need a change in Syntax to:
Expand|Select|Wrap|Line Numbers
  1. If Me.txtpassword.Value = DLookup("Password", "AcctHolder", _
  2.             "[AcctHolderID]= '" & Me![txtacctholder] & "'") Then
Feb 28 '10 #2
thanks for the help! that did the trick!!!
thanks again.
gary
Mar 1 '10 #3

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

Similar topics

1
by: Dalan | last post by:
I can't seem to find a workaround of Query Syntax Error. Actually, the query performs just fine, except when the last record on a related subform is deleted, then it generates a Runtime Error 3075...
1
by: Dalan | last post by:
I'm experiencing a Query Syntax Error with an Access 97 Db. Actually, the query performs as expected when adding any new records or editing existing ones and even deleting records, EXCEPT when the...
2
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...
24
by: deko | last post by:
I'm trying to log error messages and sometimes (no telling when or where) the message contains a string with double quotes. Is there a way get the query to insert the string with the double...
4
by: T. Wintershoven | last post by:
Hi Can someone please tell me whats wrong with the last line of the query below. The first three lines work fine but when i add the fourth line i get an error message (see text at ERROR...
2
by: jr | 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...
3
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...
17
by: trose178 | last post by:
Good day all, I am working on a multi-select list box for a standard question checklist database and I am running into a syntax error in the code that I cannot seem to correct. I will also note...
4
by: srinathvs | last post by:
Hi, I have an access db that I am trying to query from a vb6 program. I've the following code: Dim sSQLQuery As String sSQLQuery = "SELECT * FROM TblData WHERE ID = " & Chr(39) & ID &...
5
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
jinu1996
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...
0
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...
0
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...
0
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,...
0
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...

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.