Hi, I want to check the current database if a certain table name exists. If so, delete that table, otherwise, run some other code. The problem I'm having is referencing the table name. Below is my code currently:
Chain = InputBox("Enter chain number. Do not zero fill")
If...
I'm trying to filter a form whose source is a table. I'm filtering on a date field, but it's not working. I'm not using code to do the filtering, just the Form properities window. I'm trying to only return those records where the date is 12/7/05. In the option for Filter, I'm typing...
I just changed the two fields that are being summed - SalesQty and SalesWhsl to other number fields.
SELECT H.Store, Sum(H.BegInvQty) AS SumOfBegInvQty, Sum(H.BegInvWhsl) AS SumOfBegInvWhsl, D.Format_date & '' As Period, H.EndDate & '0' AS SortId
FROM [HEB July 05] AS H INNER JOIN tblDates AS D...
When I try to run the query i get the following error:
"Syntax error (missing operator) in query expression 'Max(H.EndDate) & '1'
GROUP BY H.Store'."
I've looked at the code a million times and can't find any syntax errors. Any ideas?
Thanks for all your help with this PHV!
Oops, sorry about that. Store and EndDate are Text and Format_date is Date. EndDate is yyyymmdd so for grouping purposes I connected it to the table tblDates.
Thanks
This code would give me all the potential data:
SELECT [HEB July 05].Store, Sum([HEB July 05].SalesQty) AS SumOfSalesQty, Sum([HEB July 05].SalesWhsl) AS SumOfSalesWhsl, tblDates.Format_date
FROM [HEB July 05] INNER JOIN tblDates ON [HEB July 05].EndDate = tblDates.Mainframe_date
GROUP BY [HEB...
No, I don't need an updatable recordset. I don't quite understand how to construct the Union query though. SHould i first make three Select queries and then combine them in one union query and use that as my control source in the form?
Thanks much.
Hi all,
Is it possible to do a grouping in Forms like Reports? For example, I have daily sales data that I'd like to sum by the week, while showing all the daily detail as well and then have a grand total at the bottom. Getting the grand total is not a problem (Sum statements in footer), but I...
the problem is once a week, i'll be importing 52 rolling weeks of data, with each column/field named one of those weeks.
for example, this week field 1 would be 6/18/05, field 2 would be 6/25/05, field 3 would be 7/2/05 and so on. however, next week field 1 will be 6/25/05, field 2 7/2/05...
i want to change the name of the fields each week when i import new data. one of the field names will be the current week.
i'm not looking for ready made code how to perform this, just something to get me started - specifically what coding just to import data and name fields. i can figure out...
Hi, can anyone help me with some quick and dirty code to import a text file into an Access db, which allows me to name each field as it's imported? I've looked at the TransferText method of the DoCmd, but it doesn't look like you can name the fields, other than the first row of the file...
Below is my SQL, but I'm getting the same error, is there something wrong with my syntax? This is a find unmatched query.
SELECT [2005 Inv Sched].[Store #], [2005 Inv Sched].Date,
FROM [2005 Inv Sched] LEFT JOIN [Sched RGIS] ON [2005 Inv Sched].[Store #] = [Sched RGIS].[Store #]
WHERE...
Hi, I have a query with a date field and want to add criteria to only return records between certain dates. In the criteria section of the query for the date field I have Between [Enter a beginning date] And [Enter a ending date], which brings up two input boxes asking the user for each date...
I think this might workDtTxtBx = Forms![Form1]![Text13].[Value]
DtToday = Date()
'Get new Activity Data
query = "SELECT * FROM qryDates Where [Start Date] Between '" & DtTxtBx & "' And '" & DtToday & "' order by [ChainName]"
Hi, I have the below code, but keep getting an error (Invalid argument, Expected 1) on my execute line.
DtTxtBx = Forms![Form1]![Text13].[Value]
query = "SELECT * FROM qryDates Where [Start Date]>= '" & DtTxtBx & "' order by [ChainName]"
My Start Date field is a text format (yyyymmdd) and...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.