Im trying to run Dlookup to return all values of a column in a query’s results. As Dlookup can only return 1 result I have added a row count column to the query so I can use the row count as the criteria for the Dlookup. My query results look like this in the results Query design view Query results
Tag: vba
How can I insert data in SQL server to two different tables while having a ORDER# primary key in SQL
I want to insert data on to two different tables in SQL server from VB.net. I have Identity increment set up in SQL that is where the order# comes from. The rest of the data comes from vb.net. Another issue is that every time I capture an order, everything from the Order table copies to the Order Details table which
MS Access: Why is my error message appearing immediately after entry?
I have created a form where I enter in faculty information and I made error messages appear if certain fields are missing. However, as soon as I click save, the form saves the entry like I wanted, but also immediately generates the error messages I created, even though I didn’t have a chance to enter anything new into the fields.
Insert Query only inserting the first value?
I looked around quite a bit figuring someone else must have had this issue, but I didn’t see it. It’s driving me nuts, that something so simple isn’t working and I can’t figure out why, and so I’ve spent 3 hours now on something that should have taken a couple minutes… So here’s the set up. I have a query
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
Alter Table Auto Increment starting number criteria from another query or field
I have a database that stores all our distribution partner sales. Every week I get updated sales that I load into what I call tblImport. I then have some queries I run that parse out new sales lines to tblUpdate and tblNewAccounts. What I am struggling with is automating what I call the Bill To ID(BT_ID) field in the NewAccounts
How do I properly input an sql where clause in VBA?
The where clause in the code below is throwing me an error. I just can’t seem to get the syntax right. Answer The values of the variables need to be added to the SQL, not their names, and the values need to be in an appropriate format. The following code will add the dates in yyyy-mm-dd format.
Why does “Enter parameter value” appears using INSERT INTO VALUES?
I’m always getting the “enter parameter value error” when I try to run this code. The error refers to idPat, idSP, idPar and measure_value. I have checked with the debug idPar, idPat, idSP and measure_value and they assume the correct value; the errors comes out when I run sql. Answer Your VALUES part is just text. What you need is:
Access VBA string to return a Min & Max date based on matching criteria
I am trying to use a string to get a minimum date from a field (ExpectedTaskStart) in a specified table (tblLiveTasks) using a match on two ID fields (CASEID) from (ExpectedTaskStart) the other (intCaseID) I either get no return or a return of 0. I have used various VBA outlined below but all with same outcome; I have also tried
VBA & SQL how to select specific values based on range in excel?
I am newbie in connection of vba (excel) and oracle database. I have tried to look for some information but I could not find anything that would work for me. I want to write a query that will return me only rows in which there is a specific values. My query looks like this: SQLStr = SQLStr = “SELECT NGKHFHCD,