OK, this looks like it could be the solution! I tried this and it worked fine. But I actually have 3 more fields (It's the PlanWeklyRev broken up into 3 categories). The union query worked fine when I added the 3 fields. But when I ran the Crosstab query I got an error message about...
Good catch about the output table not matching the input. I pasted from an excel sheet and for some reason the data was slightly re-arranged.
Will give this a shot!
I just tried and this and it looks like it would work well! But was hoping to find a solution that I can use within a front end of an access database.
Maybe from within the front end I can automate opening an excel file that already has the power query and data linked to the access database?
I have been trying to figure out how to transpose a query per a customer request (they want to read the information horizontally instead of vertically). But I am struggling with the Crosstab query in access. Is there a way to transform the below data:
Week Order Calendar Week LDOW Previous...
Yes, i see it now. I got rid of all that stuff and stuck with just opening the form i need. I think I originally put those lines in there before I created the new forms I wanted to open.
I was using the recordset to lookup a specific record based on a date selected from a Summary query. Here is the rest of the code:
Dim rs As Recordset
Set rs = CurrentDb.OpenRecordset("SELECT TOP 1 LDOW FROM qryWeeklyForecast WHERE LDOW=""" & LDOW & """", dbOpenSnapshot)...
I'm trying to fix a code that was working the last couple weeks but suddenly stopped working.
I have a form with a cells that fire actions when the user double clicks. So, out of no where, I am getting this error message regarding the below line of VBA:
Set rs =...
Ah, that seems to work!
amended his code:
If lst Is Nothing Then
For Each varItem In colDirList
Debug.Print varItem
Next
Else
For Each varItem In colDirList
lst.AddItem "'" & varItem & "'"
Next
End If
I have the code:
Call ListFiles("K:\CONTROLLED_DOCS\Drawings, CasaBella (SDRxxx)vE\9 Install Dwgs", , , Me.lstFileList)
The list box only lists "K:\CONTROLLED_DOCS\Drawings" (which is the same for every file in this folder)
Tried using Allen Browne's code but the the file paths have a comma so the list box is only showing the file path up to the comma.
When I call ListFiles in the immediate window it gives the full path. How can I adjust the code to deal with the comma?