Skip to content
Advertisement

Tag: ms-access

Updating Date in Access

I want to simply update a date column within a table where a status exists. Here’s what I have I have tried the following Nothing has gone through, no errors, just not updating. I can update the field manually. Answer Answers were correct, silly issue about the Trust Center ‘enable’ bar not showing, therefore didn’t realise this database location wasn’t

Error Using the iif statement in MS access

The completion_metric field from this query I made in MS ACCESS keeps giving me zero percent for all the records. I think something is wrong with my IIF statement. Also, how would can I populate a text box on a ms access form with this query. For text-boxes there seems to not be an option to let my record source

Is there a way to SELECT a database table using a variable?

I tried this statement: string query = “SELECT question FROM ‘” + GlobalVariables.dbQCode + “‘ WHERE [question_code] = ‘” + GlobalVariables.questionCode + “‘ “; and when I run the code it is giving me an exception: Syntax error in query. Incomplete query clause. Is there a way where I can use my variable? I want it to work because I

Import an Excel Sheet with File Dialog in Access

I have a splitform where I want a button to choose and import a file into a table. I have something like this: I set the reference to Microsoft Office 16.0 Object Library. When I tried using this button there was this error: Method ‘FileDialog’ of object ‘_Application’ failed. Answer I copied Albert Kallal’s answer found here: It does not

Query to Return Records with Consecutive Dates by Group in Access 2016

I have a table with a date and an ID field. An extract is set out below. I would like to run a query to return all records where the same ID appears on consecutive dates. There may be no consecutive dates or two or more consecutive dates. Here is the extract: Date No_ID 09/06/2021 24694000 09/06/2021 20102886 09/06/2021 12873514

MS Access SQL query – Count records until value is met

I have an Access query (qr1) that returns the following data: dateField stringField1 stringField2 booleanField 11/09/20 17:15 John Nick 0 12/09/20 17:00 John Mary -1 13/09/20 17:30 Ann John 0 13/09/20 19:30 Kate Alan 0 19/09/20 19:30 Ann Missy 0 20/09/20 17:15 Jim George 0 20/09/20 19:30 John Nick 0 27/09/20 15:00 John Mary -1 27/09/20 17:00 Ann John -1

How to terminate SQL statements when using DEFAULT value and OleDB?

Using C# and the JET OleDB driver (Microsoft.Jet.OLEDB.4.0) to connect to an old Access database (think Access 97). The following SQL statements work fine: But terminating the statement with a semi-colon (;) causes problems: Can SQL statements with DEFAULT be terminated? Answer Default values can (and probably should) be quoted using double quotes to avoid these errors, among others: Note

Advertisement