GoodyGoody
Registered User.
- Local time
- Today, 19:25
- Joined
- Aug 31, 2019
- Messages
- 120
Hi All,
It's been a while. Lock down definitely got in the way as all races were cancelled. now there is a prospect of them restarting I have the impetus to restart my race database project. Anyways, I feel i should know the answer to this and that it really shouldn't be as complicated as I seem to be making it as I have done some pretty cool stuff with race timing including series' results and teams and team series results. Right so,
I have a form frmSelectRaceEvent where I can select an existing raceevent (Racename plus date of race) to Edit or I can select 'Add New Race Event'. If I select 'Add New Race Event' AND I have selected a RaceName (none of the existing race events are the correct one) I just want to pass the already selected racename to the new 'Add New Race Event form just to save the user from selecting the Race name again. I'm passing the cmbRaceName value through Openargs to the 'Add Race Event form no problem but I can't fire the cmbRacename combo on the new form with the pass Race ID. The code is below, what am I doing wrong please?
In the Open Event of the 'Add Race Event' form I have
?
If Not IsNull(Me.OpenArgs) Then
Me.cmbRaceName.RowSource = "select Racename.racename from Racename where [racename.ID] = " & me.OpenArgs
Me.cmbRaceName.Requery
Me.txtRaceDate.SetFocus
End If
?
It runs the code fine but no race names at all appear in the combo box (note I still want the user to be able to select another race name but just position the combo at the one they chose on the last form as a good guess that that is the one they want to add.
As ever help is always hugely appreciated.
ThanksGoodyGoody
It's been a while. Lock down definitely got in the way as all races were cancelled. now there is a prospect of them restarting I have the impetus to restart my race database project. Anyways, I feel i should know the answer to this and that it really shouldn't be as complicated as I seem to be making it as I have done some pretty cool stuff with race timing including series' results and teams and team series results. Right so,
I have a form frmSelectRaceEvent where I can select an existing raceevent (Racename plus date of race) to Edit or I can select 'Add New Race Event'. If I select 'Add New Race Event' AND I have selected a RaceName (none of the existing race events are the correct one) I just want to pass the already selected racename to the new 'Add New Race Event form just to save the user from selecting the Race name again. I'm passing the cmbRaceName value through Openargs to the 'Add Race Event form no problem but I can't fire the cmbRacename combo on the new form with the pass Race ID. The code is below, what am I doing wrong please?
In the Open Event of the 'Add Race Event' form I have
?
If Not IsNull(Me.OpenArgs) Then
Me.cmbRaceName.RowSource = "select Racename.racename from Racename where [racename.ID] = " & me.OpenArgs
Me.cmbRaceName.Requery
Me.txtRaceDate.SetFocus
End If
?
It runs the code fine but no race names at all appear in the combo box (note I still want the user to be able to select another race name but just position the combo at the one they chose on the last form as a good guess that that is the one they want to add.
As ever help is always hugely appreciated.
ThanksGoodyGoody