I’m trying to get an MS Access database to open a form either to today’s date if it’s in the date field in the database, or the nearest date in the future. I tried the code here, but it doesn’t work. …
Tag: vba
How to use VBA variable in SQL string? Enter Parameter Value error
I get a popup box asking for the parameter value for the value of CXIid Enter Parameter Value for CXI00012. I tried ‘ ” & CXIid & ” ‘ but then I get a result of 0 rows being updated. However when I put a value in the where clause or into the Enter Parameter Value prompt I get the
search date from date time field query not working
I have below query it print following line by debug. in table the b_date is dateTime field. ( linked table from SQL server in Msaccess) in this table there is data exist with 1/30/2020 2:00:00 PM where fromtime is also 6. why query didn’t return any data? can msaccess cannot search date in datetime field? PS: fromtime is intiger not
Wrong data types when loading sql query with vba in excel
I have a SQL Query, which I want to use in VBA to load the data into Excel, the problem is that when the load is done the data in Excel is with the wrong type. For example, where it needs to be a date,…
Variable not defined on VBA about socket
I’m making an edit to a project on VBA that uses a Socket to send information to a program on Netbeans on a specific server. I did not write the code. I’m trying to understand what the original programmer did. I have many forms, and a few send information with that socket. I’m trying to do the same with another
Conditionally remove rows from ms access query (SQL)
I would like to remove rows (about 10000) from a report in ms access. I am comparing two sets of two column in a table. When I run the query I would like it to remove the rows where column 1 and 3 …
VBA Runtime Error when connection to SQL Database
I’m trying to connect to a SQL Server from multiple PCs in the same domain. When using the following code: conn.Open returns the error: Error on login for the user ‘XXXX’ Answer The issue is because you are using a named user with Integrated Security. These two modes are incompatible. Try removing Integrated Security=SSPI: Or the named user:
Why is my Me. Reference and INSERT INTO causing error?
I am receiving two errors when attempting to create a query which updates my audit log after an update is made to a record. First I am prompted to enter a Parameter Value where I believed my ME. code would point to any record with the current value of field [Corrected Med Ed ID]. Secondly I receive message: Syntax error
If a combo box = specific text then display in text box current date
If a combo box = Closed, rejected or cancelled then display today’s date in text box. for example I have a combo box that has closed open rejected and cancelled. If someone chooses closed rejected or canceled then I need a text box to display the current date. I tried the below code but not sure where to put it.
Breaking Groups into 3 buckets based on whether or not one field has any 0s
I have events that are being treated differently based on whether or not expenses have 0 attendees. Each event has a unique code with several expense line items. If the attendee field has ALL 0 for each expense in this event code, then I need to append the method field to say method 1, for each expense with this event