G
Guest
Is it possible for the popup input box to have more than 1 questions in one
prompt instead of clicking one then the other one pops up again etc?
Here is a sample code ---- Instead of the 2 inputbox popping up, i would
like to have only one inputbox with the 2 questions that the user can fill in
all at once before clicking ok?
Private Sub TRAINING_AfterUpdate()
Dim strsql As String, strValue As String, strval As String, NewID As
Integer, Response As Integer
If TRAINING = 0 Then
strValue = InputBox("What value do you want to add to the list?",
"Input Value")
strval = InputBox("what is your credit?", "Input value")
If strValue <> "" Then
strsql = _
"Insert Into tbxTraining ([Training],[credits]) values ('" &
strValue & "'" & "," & strval & ")"
'MsgBox strsql
CurrentDb.Execute strsql, dbFailOnError
Response = acDataErrAdded
NewID = DLookup("[TrainingID]", "tbxTraining", "Training = '" &
strValue & "'")
Me.TRAINING.Requery
Me.TRAINING = NewID
End If
End If
End Sub
prompt instead of clicking one then the other one pops up again etc?
Here is a sample code ---- Instead of the 2 inputbox popping up, i would
like to have only one inputbox with the 2 questions that the user can fill in
all at once before clicking ok?
Private Sub TRAINING_AfterUpdate()
Dim strsql As String, strValue As String, strval As String, NewID As
Integer, Response As Integer
If TRAINING = 0 Then
strValue = InputBox("What value do you want to add to the list?",
"Input Value")
strval = InputBox("what is your credit?", "Input value")
If strValue <> "" Then
strsql = _
"Insert Into tbxTraining ([Training],[credits]) values ('" &
strValue & "'" & "," & strval & ")"
'MsgBox strsql
CurrentDb.Execute strsql, dbFailOnError
Response = acDataErrAdded
NewID = DLookup("[TrainingID]", "tbxTraining", "Training = '" &
strValue & "'")
Me.TRAINING.Requery
Me.TRAINING = NewID
End If
End If
End Sub