Query
18 TopicsSort in Query not Displaying
I have no clue how to word this. Basically, in a form I have a field called Members. This field is a drop down menu that lists all of the Members for a meeting via check boxes. I can then tick the checkboxes for the people who attended the meeting, click 'ok', and then when when I run the report, their names will appear. I don't need this information saved; just to display on the report so I can print it. Here's my problem. Not all of the members can vote, so I want the members who can vote listed first, and the rest of the members listed next. I've put in my custom sort formula in the Members query. When I open my Members dropdown box, they are listed exactly the way I want. However, as soon as I tick on the names and then click 'ok,' it's displayed in order of the primary key. When I run the report, the names are still sorted by the primary key. I've gone to every query and table I can find to create my custom sort, but it keeps defaulting to sorting by the primary key. It's driving me INSANE. Any idea why it's doing this? I've dug through google and haven't had luck finding an answer that works. Thanks in advance!Solved277Views0likes16CommentsQuery error 3141
Yesterday I started my Microsoft 365 free trial. I created a database and made a query, when i tried to save the query i got error 3141"The SELECT statement includes a reserved word or an argument name that is misspelled or missing, or the punctuation is incorrect" but the spelling was correct. So i tried a new database and got the same error again when saving a query. This error happens with multiple different types of queries across multiple databases and when i download a database with a query already in it and copy the code from the already made query into a new query it still gives the error 3141 even though it works in an already made query. I assume this has something to do with my Microsoft Access. this is the query i made: SELECT * FROM ttblTraits;123Views0likes2CommentsI would like help writing a query to determine when people should follow up on a late shipment
Basically, I have a table that is a log for when issues of different magazines are received. Here are the fields: Title of the magazine Frequency (Monthly, bimonthly, annual, etc) Issue date (the date printed on the magazine) Received Date (The date the item was received) Expected Next Issue Date (Calculated field that figures out when the next issue should come in based on the Received Date and the Frequency) I want a query that, for each title, returns the record for the last issue that was received, but ONLY if it is after the "Expected Next Issue Date" for that record. For example, Time is Biweekly. So If they receive it January 1, and it is now January 15 and the next issue was not received, I want the query to return the record for the issue that was received on January 1, but not any of the issues that were returned before that (so not any issues that were received in December of the previous year). Right now I have a query that does that, but it requires the user to check off old issues as they receive things, which is not ideal. Any ideas on how to write a query that will do what I want?128Views0likes3CommentsAccess Query Expressions not working: Replace, InStr
I am trying to run a relatively simple query and receive a compile error. The two fields involved are both text fields. SELECT Spouse, Replace(Spouse, Last, "") AS Result FROM SimplifiedTable; What this query should do is look at a text Spouse field, and, if the last name is present in it, replace it with blanks. Ideally, I would add an RTrim to the thing to just get the first name of the spouse. I have tried the same query with brackets around the fields, with tableName.fieldname, etcetera. No joy: Compile error. in query expression 'Replace(Spouse, Last, ""'. (It also errors if I try using single quotes -- is there an escape I should be using?) Additionally, I enlisted the assistance of AI and tried to do the same thing using InStr -- Here's a sample of other approaches attempted: SELECT Spouse, IIf(Spouse Like "*" & [Last] & "*", Left(Spouse, InStr(Spouse, [Last]) - 1), Spouse) AS Result FROM SimplifiedTable; SELECT Spouse, IIf(Spouse Like "*" & [Last] & "*", Left(Spouse, Len(Spouse) - Len([Last]) + 1), Spouse) AS Result FROM SimplifiedTable; Each of these queries received the same error message (the quoted text the only differentiator). If I run a select query on just the fields, or concatenate them, no problem. Thanks!918Views0likes4CommentsAccess 365 Query
I am using Access 365 on Windows 10 PC. My database is in Access 2016 format. I haven't used Access in some time and am perplexed by my difficulty in successfully designing a query. I have a list of members of a legislature. One of the fields is office type; the choices are Legislative Office, Constituency Office or Ministry Office. I have tried multiple options in my Simple Query to obtain a list of Legislative offices. No matter what I've tried, I get blank results with a syntax error message. Among my attempts where "Legislative", "Legislative Office" and "not C" None have been successful. Screenshots attached show table format, query design view and syntax error. Please point me in the right direction. Thanks in advanceSolved1.2KViews0likes4CommentsLinking an external query to a field in a form
I have a form where the record source is a query joining several tables. There is a field for location (NationalGridReference). I have an external query (NGR_to_XY) which converts NationalGridReference to two numeric fields (X and Y). I want to have an X and a Y field in the form that automatically populate from NGR_to_XY. Whenever I join NGR_to_XY to the form's query it no longer allows editing of any fields in the form, although the X and Y fields are populated correctly. How can I join the NGR_to_XY query and still be able to enter data into the form? I did find this question but the solution uses VBA which I don't know how to use, is there a way that just uses regular design view?Solved1.2KViews0likes3CommentsSet up query to find missing data in multiple fields
Hey Microsoft Community, I am trying to set up a query that will find records that are missing data. For example, I have a main form where users will enter biographical data, but they may be missing the birthday, the last name, and the phone number. The idea is that this query will help us identify the records which are missing data and allow us to then go back and enter this data in when we find it. How would I set up the query to catch the records with any missing data? I first tried to place "Is Null" (not in quotes) in the OR section of the query, and it worked with only one field being tested, but as I added more fields it could not find a record with missing data. As always thank you for taking the time to read this and help with this issue. I look forward to your response. Thanks, EbSolved6KViews0likes4CommentsSubset in a larger set
Hello I have a large table with positions (personnel). Some positions may be occupied by more than one person during the year; consequently, position numbers repeat if I also get the name of the person and the date. Position Name LastName EndDate 1234 John Sullivan 31/12/2020 8546 Susan Kent 03/15/2020 8546 Juan Valdez 09/30/2020 3454 Samir Bhutteer 31/10/2020 How can I run a qry to get only the second record for 8546, that is the most recent occupancy? I guess I need to nest the SELECT statements, but I don't know how. Thank you LeonelSolved1.2KViews0likes3CommentsExcel web query DataFormat.Error "not a valid path"
Hi, I have a workbook that grabs data from a few online Excel workbooks. This was working fine from when I set it up about six months ago until recently, when it started producing a DataFormat.Error. One of the data sources that my workbook queries is the Reserve Bank of Australia exchange rates in this file: http://www.rba.gov.au/statistics/tables/xls-hist/2014-current.xls This is the error that I get: DataFormat.Error: 'C:\statistics\tables\xls-hist\2014-current.xls' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides. Details: 2014-current.xls This used to work just fine with no errors. I've tried on multiple computers with the same issue, and I've tried three other links to publicly available online excel workbooks with the same issue. I've tried adding a new query (by selecting query from workbook or query from web) in a fresh workbook and pasting that link as the source, but I still get the same error. It's weird that the error is referring to a file at C:\ and not the URL that I entered. I'm using MS Office Professional Plus 2016, Excel version 16.0.4266.1001 64 bit. Does anyone know how to get around this issue? Thanks in advance, SimonSolved16KViews0likes10CommentsPower Query freezes in Excel
Hello, I'm having issues editing queries in Excel. Whenever I enter a Power Query window, the window opens but shows no data and all excel sheets freezes. I can highlight the tools but they do not react when I try to click them. Nor can I close the Power Query window. The only way I manage to close excel is by forcing it through task manager in windows. I believe the problem started when I updated excel from verision 1902 to 1907. I have reinstalled office and I am now running version 1908, but the problem is still present. I have tried to access power query in multiple workbooks, but with no success. Has anyone experienced a similar problem? Any suggestions on how to fix this would be very welcome. Thank you for your time!18KViews0likes5Comments