SELECT FROM Query name

I am using a SELECT statement as a rowsource on a form listbox.  I have a 
query named 01-Accounts Query and the SELECT stmt reads as follows...

SELECT 01-Accounts_Query.Name, 01-Accounts_Query.Date FROM 01-Accounts_Query

I get a syntax error in query message.  How do I fix this?


0
Utf
3/8/2010 4:33:01 PM
access.formscoding 7493 articles. 0 followers. Follow

1 Replies
1110 Views

Similar Articles

[PageSpeed] 52

gator wrote:

>I am using a SELECT statement as a rowsource on a form listbox.  I have a 
>query named 01-Accounts Query and the SELECT stmt reads as follows...
>
>SELECT 01-Accounts_Query.Name, 01-Accounts_Query.Date FROM 01-Accounts_Query
>
>I get a syntax error in query message.  How do I fix this?
>

Any name that contains a character oher than alphanumerics
and underscores MUST be enclosed in [ ]  The [ ] are also
required if the name does not start with an alpha betic
character.  Because using funky characters in names adds to
syntax complexity, requires more typing and increases the
potential for mistakes, it is a best practice to never use
funky charcters when you make up a name for anything.

I strongly urge you to change the name of the query to
something more like Accounts01query, but if you like the [
], you can get away with using [01-Accounts_Query]

-- 
Marsh
MVP [MS Access]
0
Marshall
3/8/2010 5:04:55 PM
Reply:

Similar Artilces:

Project Name on POP Receivings posting journal
Ability to put Project Name and number on the POP receivings posting journal ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgbrowser/en-us/default.mspx?mid=1beb1016-e5ea-4dd0-ae7e-0cdb71e8e8da&dg=micr...

How change Sign-in Name?
I've been using Money for years. Recently I've changed my passport account email address because the old one will no longer be available to me in the near future. When starting Money, I entered the new email address and password and Money allows me to log in. However, the issue is, the next time I start Money, the old email address is back in there and I must enter the new email address every time I start Money. How can I change the Sign-in name to same the correct email address? (I tried File/Password Manager and it will show the new address... until I close and re-open mone...

Query Text in the Mid of a memo
I am trying to query off a memo field [Description] the text that follows "User Name: " until the first space the "User Name: " is not in the same position nor is the text of the user name a fixed size. I am working with an InStr function but I don't know how to stop at the " " after the name. Thanks so much for any help. AngieSD wrote: >I am trying to query off a memo field [Description] the text that follows >"User Name: " until the first space the "User Name: " is not in the same >position nor is the text of the user n...

selecting ranges
I have data in column A. I want to enter a value in column B down to the same number of rows that are non- blank in column A. Problem is that the amount of data varies and so does the number of rows. How do I do this? Hi Pam You can enter a value in b1 for example and double click on the down right corner of the cell b1 -- Regards Ron de Bruin (Win XP Pro SP-1 XL2000-2003) www.rondebruin.nl "pam" <anonymous@discussions.microsoft.com> wrote in message news:01bf01c3c4c7$c95e91e0$a301280a@phx.gbl... > I have data in column A. I want to enter a value in > col...

Customizing menu item names, form names etc.?
Hi all, Is there any way to customize the names of forms - for example if I want to call an "account" a "business partner" and modify it in the menu items and form/view names as well, can I do it? Thanks in advance, -- Anurag ...

Display middle name with Primary Contact field on Account screen?
How do I Display the middle name with Primary Contact field on Account screen? Please help. We use the Primary Contact field on the main Account screen to search and select a contact. The field then displays the First Name + Last Name of the contact that was selected. Can I make it show First Name + Last Name + Middle Name? How do I do it? I will be very appreciative for any help I receive. Thanks adna; The CRM has one format for displaying contact names. you can set that format in Settings-->Administration-->System Settings. While First Name + Last Name + Middle Name isn&...

Local OLAP cubes in Excel/MS Query
Hi Can someone please recommend some good book or web page about creating local OLAP cubes using MS Query. I have some data in Access that I want to work with using cubes. Kind regards IgorM http://wang.se/en/CreateOLAPCube.html/ Ed Ferrero Hi Thanks for response. Unfortunately I still don't know if the show-details-after-double-click feature is available in pivottables linked to OLAP cubes. I tried all three connection types. With the two first options (rebuild at once and rebuild when needed) I still cannot make the pivot table to create a sheet on the fly and provide detai...

Clear Selection in a Clist. How?
Hi all; I've got a small problem: One of the Clist in a Dialog is a multiple selection List. When I click on abutton, several lines are selected in the Clist. No problem so far. But I need to clear the selection before click on another button, because, if I don't clear it, old lines and new lines are selected at the time. With no multiple selection CList, I can clear the selection with SetCurSel(-1), but with a multiple selection CList it doesn't work, neither SetSel(-1), because with this, all lines are selected. How can I clear all selections? Thanks a lot Dalton "D...

Insert file name in Excel
I want to insert the file name into a cel of my Excel Worksheet. I need this for document management issues with Microsoft Business Soltutions Axapta. I work with Microsoft Office Excel 2003. =MID(CELL("filename",A1),FIND("[",CELL("filename",A1)) +1,FIND("]",CELL("filename",A1))-FIND("[",CELL ("filename",A1))-1) HTH Jason Atlanta, GA >-----Original Message----- >I want to insert the file name into a cel of my Excel Worksheet. >I need this for document management issues with Microsoft Business >Soltutions ...

Add names to scatter plot chart
I have three columns of info in my excel spreadsheet. column 1 has names, column 2 has numbers and column 3 has numbers. I can create the scatter plot chart just fine, but what I am having a problem with is that I cannot get the names from column one to show next to the points on the scatter plot. How is this done? -- oberon.black ------------------------------------------------------------------------ oberon.black's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=26732 View this thread: http://www.excelforum.com/showthread.php?threadid=471758 I'm gu...

View query results in MsgBox
I have developed qryQuickLook that brings up rptQuickLook when cmdQuickLook is clicked, everything works great but I would rather see the results (never more than 10 line items) in a MsgBox than have a seperate report window open up. Is there a way to do this? Thanks Dave On Nov 23, 11:00 pm, Duane Hookom <duanehookom@NO_SPAMhotmail.com> wrote: > Why "MsgBox"? You can display the results in a dialog form with a command > button or two. > > -- > Duane Hookom > Microsoft Access MVP > > > > "maces...@gmail.com" wrote: > > I have deve...

Get control of a Userform by the Name
I want to change the text of a form. I know the name of the form and the name of the control in it. How to get the control of a form if I know the Name? Below post refers to adding a form. But I already have a form, just need the control of that! http://groups.google.co.in/group/microsoft.public.excel.programming/browse_thread/thread/beedb666e1d7a29b/f2df993ded867dd4?hl=en&lnk=gst&q=form+by+name#f2df993ded867dd4 Thanks a lot in advance Regards' Joe If you are talking about a VBA user from in VBA window press F4 (View properties window) and click on the control....

look up a selection of data
Hi I would like to transfer or look up data when keying in a reference number and bring up all the data regarding the ref number Eg Cell A1 = 101, B1 = John and C1 = january Cell A2 = 102, B2 = Mark and C2 = january Cell A3 = 103, B3 = Sam and C3 = February Cell A4 = 101, B4 = John and C4 = March Cell A5 = 101, B5 = John and C5 = June When I key in Ref 101 in a chosen cell (eg.A10) then the display should have all the details Cell A11 = John, B11 = January Cell A12 = John, B12 = March Cell A13 = John, B13 = June I assume A11, A12 and A13 should also have formulas to generate data but I c...

Rename Cell Name
hey all, i have change the cell anem from A1 to StartCell. Bu, how can i rename it back to A1 or change it to another name? Thanks in advance Regards Dragon Hi Dragon go into insert / name / define - you can delete the name there and create another if you wish. Cheers JulieD "Dragon" <Dragon@discussions.microsoft.com> wrote in message news:B6A6510E-0233-4B2A-8A0C-F16F73585CBA@microsoft.com... > hey all, i have change the cell anem from A1 to StartCell. Bu, how can i > rename it back to A1 or change it to another name? > Thanks in advance > Regards > Drago...

select and copy files
I have a table that has following fields: 1) account number 2)assiciated file name and 3) description of file 4) file path. Filenames are formatted as account number with 2 digit alphanumeric code following (i.e. 12345a2, 67890b1) table has approximately 300,000 records each associated with one of 130,000 unique account numbers. Goal is to select and copy to new destination only those files associated with a subset (approc 100,000) of 130,000 unique account numbers. Inversely, I could copy all 300,000 files then select and delete those associated with the 30,000 account numbers. any...

Using a listbox selection to limit records in a form and report
I am trying to use a listbox of names to limit the results of a form to just those names. On a similar track, I want to use the selected names to limit a report. I have the listbox created and have added a button next to it to initiate the next step, but cannot figure out how to do it. Also, would like to (if possible) use multiple listboxs in the same way (ie, name and/or department). "dascooper" <dascooper@discussions.microsoft.com> wrote in message news:1227B7CC-3345-4FDC-8EB0-94BEF46660FD@microsoft.com... >I am trying to use a listbox of names to limit the resu...

Report based on parameter query
I have a report that is based on an ordinary parameter query (i.e. right now it pops up dialogs asking for three values that it needs for its where clause). I use this query in several places, so I don't want to make the parameters dependent on specific form controls, which is the only information I've been able to find on google on feeding parameters in a report query's Recordsource. What I actually want to happen is to make a button in the main switchboard which, when pressed, will look up those values in a different query I already have and then use those to populate th...

How do I select multiple rows randomly in MS Excel?
How do I select multiple rows randomly in MS Excel? Hi Select your first row and then hold down the Ctrl key while selecting the others. HTH Michael "Varun" wrote: > How do I select multiple rows randomly in MS Excel? "Varun" <Varun@discussions.microsoft.com> wrote > How do I select multiple rows randomly in MS Excel? Just another angle to the post's interp .. (with emphasis on "randomly") Here's an example set-up to play with .. Assume we have 6 rows of data below in Sheet1's A1:C6: Data1 Text1 Desc1 Data2 Text2 Desc2 Data3 Text...

Multiple Unrelated Queries In One Report or Form?
Hello guys, I've been tasked with generating a report for my boss that provides an overview of our core database statistics. This includes the total number of orders placed each month and the total value of orders placed each month. I also need to provide the same information for purchase orders, quotations and discrepancy reports. Each individual query is a piece of cake on its own but how can I display all of this information either in a form or preferably in a nicely formatted report? The queries are all completely unrelated so there's no way I can somehow joi...

Query to Compare Actual and Budget
One table defines budget (each one has a unqiue ID) Another table defines employees (each one has a unique ID) Another table defines tasks (each one has a unique ID) Another table records budgeted time by project, task, employee Another table records actual time by project, task, employee I created one query which will total up the budgeted time by project and employee (so if an employee was assigned multiple tasks on the same project, you'll just get one total for that employee for that project). I created another query which will total up actual time byt project and employee (so if an e...

Selection from list on main sheet from suplemental sheet in same w
Okay I am new to excell bar drawing little spreadsheets to do my own financing. I am currently setting up a sheet and need the users to be able to select from a list of options only and not input thier own text - does that make sense? also i ahve 12 names on the list and one master with all on - would like the data entered on to a names list to be automatically entered onto the master or vice versa which ever is easiest. sorry if this sounds jumbled but i am totally lost and this has to look really hot for work! regards Kelly - England You only need to ask in one place, Kelly. :) *****...

Repost-Edit and save query criteria
Sorry to repost this, but I was not sure I would get help with this again and it would get lost in the list. As suggested, I created a table called ExcludeShows1 with the ShowID and Year fields. I have posted the SQL with those changes to the query. When I tested this initially, it appeared to work. Then I tried testing the queries using last year's show data for 2009. No data is being returned for 2009. Not sure what is happening that it is not returning 2009 data. SELECT Shows.ShowID, Entries.Place, IIf([Entries]>1,([Entries]-[Place])*0.5,0) AS Points1, IIf([...

How to update query memo field
I have an old db that I need to import a long notes field from. My new table is existing. I have managed to get the notes from the old db into a comma separated text file with just an SSN and the notes. I can import this into a table that is structured with just an SSN field and a memo field. I'm trying to run an update query to fill in the notes fields of the people already in the new table. When I run the update query it says it's going to update x number of records, but doesn't. I tried changing both the old and new tables to text fields as an experiment and then it works, but o...

Create Login and Role Name
Hello, I am trying to create a SQL Server Security Login to access to a database. That login will be used by my application Linq to SQL context. What is the correct rolename for this kind of user. I have the following: create login WAT with password = 'wat', default_database = WAT, default_language = english; go exec sys.sp_addsrvrolemember @loginame = N'WAT', @rolename = N'sysadmin' use WAT; go Should I use sysadmin? I think this is not correct. Am I creating the login correctly? Thanks, Miguel shapper (mdmoura@gmail.c...

select two option to one criteria
thanks for you help yesterday with a dsum just one quick question this code below ..... [cbMonth] & "' And [Revenue Stream Division] = 'Production'") how do i get it to select "Others" as well in [Revenue Stream Division] so something like [Revenue Stream Division] = 'Production' & 'other'") but that didn't work thanks ..... [cbMonth] & "' And ([Revenue Stream Division] = 'Production' Or [Revenue Stream Division] = 'Other')") "Alan" wrote: > >...