I was changing a few things in my database when I came across this error, doesn't like my code when I am trying to use the comma to seperate the last ans first name, thinks i am at the end of a line. How can I fix this? Thanks -
Private Sub Check76_AfterUpdate()
-
If Me!Check76 Then 'is true
-
Me.List26.RowSource = "SELECT tblStaff.ID, [LastName] & ", " & [FirstName] AS Expr1, tblStaff.FirstName, IIf(tblStaff.Current,'Yes','No') AS txtIsStaffCurrent FROM tblStaff ORDER BY tblStaff.LastName;"
-
Else
-
Me.List26.RowSource = "SELECT tblStaff.ID, [LastName] & ", " & [FirstName] AS Expr1, tblStaff.FirstName, IIf(tblStaff.Current,'Yes','No') AS txtIsStaffCurrent WHERE (((tblStaff.Current) = True)) ORDER BY tblStaff.LastName;"
-
End If
-
End Sub
-
2 3936
I was changing a few things in my database when I came across this error, doesn't like my code when I am trying to use the comma to seperate the last ans first name, thinks i am at the end of a line. How can I fix this? Thanks -
Private Sub Check76_AfterUpdate()
-
If Me!Check76 Then 'is true
-
Me.List26.RowSource = "SELECT tblStaff.ID, [LastName] & ", " & [FirstName] AS Expr1, tblStaff.FirstName, IIf(tblStaff.Current,'Yes','No') AS txtIsStaffCurrent FROM tblStaff ORDER BY tblStaff.LastName;"
-
Else
-
Me.List26.RowSource = "SELECT tblStaff.ID, [LastName] & ", " & [FirstName] AS Expr1, tblStaff.FirstName, IIf(tblStaff.Current,'Yes','No') AS txtIsStaffCurrent WHERE (((tblStaff.Current) = True)) ORDER BY tblStaff.LastName;"
-
End If
-
End Sub
-
I am also New at Access VBA but I believe you want to change your double quotes (") inside double quotes (") to a single quote ( ' ) on either side. That should work for you.
Nick
Worked perfect, thank you
Sign in to post your reply or Sign up for a free account.
Similar topics
by: James Campbell |
last post by:
ok, I am totally new to php and come from an asp background.
I basically want to do an If > then > else > end if statement:
my page is:
<?php require_once('Connections/carresa.php'); ?>...
|
by: Najm Hashmi |
last post by:
Hi all ,
I am trying to create a store procedure and I get the following error:
SQL0104N An unexpected token "END-OF-STATEMENT" was found
following "END". Expected tokens may include: "JOIN...
|
by: Cro |
last post by:
Dear Access Developers,
The 'Allow Additions' property of my form is causing unexpected
results.
I am developing a form that has its 'Default View' property set to
'Continuous Forms' and am...
|
by: user_5701 |
last post by:
Hello, I'm getting an error with a Docmd.Transferspreadsheet line of
code:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel2000,
"tblTest", pathAndFilename, True
The above line...
|
by: ashu |
last post by:
hi
look at this code
include <stdio.h>
int main(void)
{
int i,j=2;
i=j++ * ++j * j++;
printf("%d %d",i,j);
return 0;
|
by: Jim Michaels |
last post by:
C:\prj\quiz\withusers>php tareports.php
PHP Parse error: syntax error, unexpected T_ELSE in
C:\prj\quiz\withusers\tareports.php on line 205
this is the section of code.
if (isset($row4)) {...
|
by: AB |
last post by:
Hi to all,
I have a problem about a importation of a file *.csv with SQL Server,
through a bulk insert, called in a store procedure that a c# sw calls.
This is the description of the error:...
|
by: fburn |
last post by:
I need some help with an error I'm getting using php 5.2.5 running on linux.
I receive an error:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or...
|
by: JRough |
last post by:
I'm trying to use output buffering to cheat so i can print to excel
which is called later than this header().
header("Content-type: application/xmsdownload");
header("Content-Disposition:...
|
by: maveri4201 |
last post by:
I have written a php script (test3.php), which I attached as a text file. Its includes are also attached as text files. I'm trying to run the script here: http://www.wondergy.com/phptestbed/test3.php...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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,...
|
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...
| |