Let me start by saying that I have been new to Access and been away from VB for MANY years. I am just getting back into it for this project, so I am basically a neophyte, again.
The project is as follows: I need to query an SQL database, assign the result of the query to variables, and create a text document, which includes the data in the assigned variables and output to a file.
So far, I have been able to link the sql file and create the query, and create and output the text document; however, I my failure is in assigning the query results to variables in VBA.
I am able to assign the field information to variables; however, that does not give me the filtered results.
This is my query:
Would someone advise the best way to assign this filtered query data to variables?
Thank you
The project is as follows: I need to query an SQL database, assign the result of the query to variables, and create a text document, which includes the data in the assigned variables and output to a file.
So far, I have been able to link the sql file and create the query, and create and output the text document; however, I my failure is in assigning the query results to variables in VBA.
I am able to assign the field information to variables; however, that does not give me the filtered results.
This is my query:
Code:
SELECT DISTINCT dbo_tblTicketsRow.fldTicketID, dbo_tblClients.fldClientID, dbo_tblTicketsSummary.fldTicketStatus, dbo_tblClients.fldFirstName, dbo_tblClients.fldLastName, dbo_tblClients.fldHomePhone, dbo_tblTicketsSummary.fldDateScheduled, dbo_tblTicketsRow.fldStartTime, dbo_tblClients.fldCellPhone
FROM (dbo_tblClients INNER JOIN dbo_tblTicketsSummary ON dbo_tblClients.fldClientID = dbo_tblTicketsSummary.fldClientID) INNER JOIN dbo_tblTicketsRow ON dbo_tblTicketsSummary.fldTicketID = dbo_tblTicketsRow.fldTicketID
WHERE (((dbo_tblTicketsSummary.fldTicketStatus)="open") AND ((dbo_tblTicketsSummary.fldDateScheduled)=[Enter Date]));
Would someone advise the best way to assign this filtered query data to variables?
Thank you