Skip to content
Advertisement

Tag: vba

Access Query to return custom quarters from a date field

If someone could help me out on this problem. This company’s quarter starts as follows where the numbers represent the months and the Q’s are the quarters. I am trying to make a query a that returns the number 1, 2, 3, 4 for dates that fall within the quarters. I have researched and came across this approach but doesn’t

Nested SQL Select query in Excel with VBA

I’m trying to make SQL query on multiple Excel worksheets. I have setup like this (each table is a separate worksheet): Three worksheets – one with condition, second with source data and third with the output. In the Output I need all records from the Source where value in the ColumnA is present in the Condition next to a positive

Time calculation from Date & Time

I am trying to figure out a way where I can use MS access to convert the the following data to show the minutes spent within each column, whilst also discounting weekends from the final figure. This …

Joining on 3 csv files

I need to retrieve data from 3 different CSV files (Adres.CSV, ID.CSV and Regios.CSV) and combine this in an Excel table. This SQL statement works fine, StrSQL = “SELECT ID.[ID], Adres.[Naam], …

Inner join with Count, multiple tables

I’m having an issue with MS Access to get correct counts on multiple tables. I’m not at all an expert in SQL requests. I have a set of tables which is structured as follow : Table1 : UID, Name, other informations Table2 : UID, FK_UID_Table1, Name, other informations Table3 : UID, FK_UID_Table2, Name, other informations Table4 : UID, FK_UID_Table3, Name,

Concatenating variables into a string for a query url

I am trying to program a dynamic url that changes as the day changes. I can get the query to run if I hardcode the date into the string but it will not run when “todaysDate” is used at the end of the url. I looked in the locals window and the variable url returns the correct string needed to

Access add new SQL data

I would like to add some Data in my SQL table… Thats the actual build. – table User (Saves Useraccess data with column UserId, UserForename,UserSurname, Mail) – Formular add new User My formular has 3 TextFields for UserForename, UserSurname, Mail and a button for adding the details. By clicking the button the following code should be executed… The UserID should

Access VBA SQL Update – Too few Parameters expected 1

I am new to access VBA. I am trying to add 1 to all numbers in a field that are equal or greater than the value in text box [TP_Bld_OrderNum_Txt]. This is my code: I get this error: too few parameters expected 1 I believe it relates to the text box value. If I replace Me.TP_Bld_OrderNum_Txt with a number, the

Writing Query statement with a String and a Date in Excel VBA

Using an ADODB connection, I have an excel database where I store data, and I am trying to make a query in one of the sheets(db_Reports). Values for Lastname and Birthday are entered in textboxes (tb_Lastname & tb_bday, respectively) from a userform. My problem is that the first two query statements work (commented in this case): one queries Lastname which

Advertisement