neillovell
Programmer
What is the command to show my query results to a user?
Here is my code for a form with a button and a drop down menu, which the user selects a record identifier from e.g. to get all records that have AppName = ACROBAT, choose ACROBAT from the list.
Private Sub Command12_Click()
' Create variables
Dim AppName As String
Dim DatabaseConnection As ADODB.Connection
' Set the connection to the DB
Set DatabaseConnection = Application.CurrentProject.Connection
' Get the name of the person to add
AppName = AppNameChoiceComboBox.Value
If Name = Null Then
' Do nothing at all
End If
' Text between speech marks is copied in as-is, while that outside of it (i.e. & Name & and & Number &)
' has the value extracted from the variables.
' Be sure that single quotes, that must go around strings, are included as-is !
SQL = "SELECT * FROM TimingResultsTable WHERE AppName = '" & AppName & "' ORDER BY AppName"
DatabaseConnection.Execute SQL
End Sub
Here is my code for a form with a button and a drop down menu, which the user selects a record identifier from e.g. to get all records that have AppName = ACROBAT, choose ACROBAT from the list.
Private Sub Command12_Click()
' Create variables
Dim AppName As String
Dim DatabaseConnection As ADODB.Connection
' Set the connection to the DB
Set DatabaseConnection = Application.CurrentProject.Connection
' Get the name of the person to add
AppName = AppNameChoiceComboBox.Value
If Name = Null Then
' Do nothing at all
End If
' Text between speech marks is copied in as-is, while that outside of it (i.e. & Name & and & Number &)
' has the value extracted from the variables.
' Be sure that single quotes, that must go around strings, are included as-is !
SQL = "SELECT * FROM TimingResultsTable WHERE AppName = '" & AppName & "' ORDER BY AppName"
DatabaseConnection.Execute SQL
End Sub