To give you some background, what I'm trying to do is create an interface that lets people create game scenarios. Through various screens (forms) they can select different options. These are then saved in a final tblScenario.
I've been able to let them fill out txt boxes (Scenario Name, etc.) and choose options from a cmb list box (Xbox, PS3, etc.). However, each time they click the button, the cell gets put on a new row.
How do I change the code to insert all of these into the same (or active) record?
For the first one (txtScenarioName) I want it to add a new record. But thereafter, each one should be added to that same record. Here's an example of the ones that come after the Name screen:
Private Sub btnPlatformNext_Click()
Dim intPlatform As Integer
cmbPlatform.SetFocus
intPlatform = cmbPlatform.Value
Call CreatePlatform(intPlatform)
End Sub
Private Sub CreatePlatform(plat As Integer)
Dim strSQL As String
strSQL = "Insert into tblScenario (scenarioPlatform) values ( """ & plat & """)"
CurrentDb.Execute (strSQL)
End Sub
Thanks in advance for any help!
I've been able to let them fill out txt boxes (Scenario Name, etc.) and choose options from a cmb list box (Xbox, PS3, etc.). However, each time they click the button, the cell gets put on a new row.
How do I change the code to insert all of these into the same (or active) record?
For the first one (txtScenarioName) I want it to add a new record. But thereafter, each one should be added to that same record. Here's an example of the ones that come after the Name screen:
Private Sub btnPlatformNext_Click()
Dim intPlatform As Integer
cmbPlatform.SetFocus
intPlatform = cmbPlatform.Value
Call CreatePlatform(intPlatform)
End Sub
Private Sub CreatePlatform(plat As Integer)
Dim strSQL As String
strSQL = "Insert into tblScenario (scenarioPlatform) values ( """ & plat & """)"
CurrentDb.Execute (strSQL)
End Sub
Thanks in advance for any help!