473,473 Members | 2,158 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Expected line or label statement or end of statement

21 New Member
I'm coding in vba in access and i'm trying to use a line of code for the Dateadd function but for some reason I am getting the error "Expected line or label statement or end of statement" can't find what's wrong since I used the same sentence in a control source of a textbox and it worked pretty well.... :/

Expand|Select|Wrap|Line Numbers
  1. = DLookUp("[HC interval]","tblEmployee","[Employee ID]=" & [txtID])
Jun 30 '16 #1

✓ answered by Seth Schrock

You have to assign that value to something. Control Source isn't VBA, so while starting your code with an equals sign in a control source is the correct thing to do, it isn't in VBA. You either need to have a control name or a variable name before the equals sign.

1 2250
Seth Schrock
2,965 Recognized Expert Specialist
You have to assign that value to something. Control Source isn't VBA, so while starting your code with an equals sign in a control source is the correct thing to do, it isn't in VBA. You either need to have a control name or a variable name before the equals sign.
Jun 30 '16 #2

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

Similar topics

1
by: Phil Powell | last post by:
Here is the function ArraySearch: '-------------------------------------------------------------------------------------- 'ArraySearch will return an integer value indicating the first...
7
by: Graham James Campbell CS2000 | last post by:
Having a nightmare problem with this and would appreciate any and all help. The situation is I want to move from a webform and format the user inputted text into some html I am storing in a...
6
by: DLP22192 | last post by:
I have the following single-line if statement that is evaluating true even though it shouldn't. I have never seen this before and I am concerned that this can happen in other areas of my code. ...
2
by: Edward S | last post by:
I would appreciate if someone could correct my SQL statement which is displaying a message Expected : End of Statement this statment is attached to a button on the form StrSQL = "PARAMETERS !!...
3
by: NeilH | last post by:
Hello All I was wondering if someone could offer a rather inexperienced person some advice. Im trying to get my asp page to look at an access data I created the following query in access...
3
by: Dax | last post by:
Hi, during the creation of an HTML page using asp variable I have this problem: Microsoft VBScript compilation (0x800A0401) Expected end of statement /asp/pages/connect1_1.asp, line 27, column 35...
12
by: natasharose | last post by:
Hi, I am new to VB and have run into an error message and I am not sure what the problem is ... I am trying to use VB to open up an SSH tunnel ... the error message is : "Expected Line number,...
2
by: teddysnips | last post by:
I have an application that does some data manipulation of some tables to format a table for a report. 1. First I open the table that gives me the parameters for some later queries strSQL =...
7
by: siocodes | last post by:
I know I am so close on this, but I cannot see what the syntax fix is. I am sending two e-mails via one asp page; one to the gift giver and one to the recipient...I originally had the message text in...
2
by: sureshl | last post by:
Page opens like this.... phone:123243453 email:henria@real.com but aftr clicking that button I need to display like this.. phone:12324**** email:hen***@****** Error on this line:::
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
1
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...
1
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...
0
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.