I’m trying to open a form with a SQL condition set up from items selected in a listbox. I keep getting an error Syntax error in query expression. Which I don’t understand because if I create a new …
Tag: ms-access
MSACCESS returning NULL values where textbox = “blank”
I have a search query that returns values from textboxes. I want to add the functionality to return all rows where Comments is null or empty. I have tried editing the SQL to accept “blank” in the …
How to get counts + sum of counts in MS Access?
I have a table ‘workers’ which contains data like name | category ———————- Steve | A Anne | B Linda | A … etc I want to get an overview of categories (counts of …
How to sum a column where another column is equal to other table
I have 2 tables, Assets and Main. I want to create a query that will total the transactions in Main, grouped by each account in Assets. But there’s a catch: sometimes the amt needs to be summed as a …
Joining two tables, one of which containing the other
I am new in the SQL world (my problem might be very easy to solve). Also,I work exclusively on Access. I’m french and I realise that it is hard for me to explain so I’ll give you a demo after. I have …
Query columns based on values of table
I’m new to DB and SQL so I don’t know if there is anything new I need to try for this. I want to solve this table my senior has given to me: Passbook(Table Name) Date | Amount | Type ———-…
‘CREATE TABLE’ generates Run-time error ‘3290’
I have a syntax issue in the first CREATE TABLE statement. I’m receiving the following VBA error: Run-time error ‘3290’ The goal is to move the distinct data to a new table dependent on values in …
SQL Sums with Where Clauses
I have a Table of “hours” that I am trying to create a SQL query to total some sums depending on a couple variables. In my table there are HOURS, Location, User, Activity. (with many other fields) I want to Total the sums of Sum(Hours) AS TotalHours, Sum(Hours where Location=Place1) AS OffisteHours, Sum(Hours where Location=Place2) As OnsiteHours Group it by
concatenate columns based on blank columns
I am having three columns,- and / should be used as separator result should come in new column(File Index-sub Index/Year),if sub index is blank then result should be (File Index/Year). SELECT [ …
How to order a recordest returned from a query by a field created within that same query (MS ACCESS)
The Query (For this question I do not think that you need to see schema): SELECT Agencies.AgencyName, (SELECT DISTINCT MAX(Invoices.CostsTotal) FROM Invoices WHERE Contracts.ContractID = Invoices….