ajetrumpet
Banned
- Local time
- Today, 13:27
- Joined
- Jun 22, 2007
- Messages
- 5,638
Well that's wonderful, but what about mine!?P.S.
Craig, I am working on the Prius for ya![]()



Well that's wonderful, but what about mine!?P.S.
Craig, I am working on the Prius for ya![]()
Well that's wonderful, but what about mine!?![]()
![]()
![]()
Are you talking to me Colin? I haven't even looked at your database! If you're referring to my earlier points about SQL, those are just rules that can be used by anyone, in any situation (unless of course you've seriously screwed up your database structure!!).I think the part that is screwing me up is that the values I need to appear in the combo boxes aren't all from one table. I can't seem to logically work out how the SQL should be that must be included in the code for the AfterUpdate event.
Are you talking to me Colin? I haven't even looked at your database!
What do I get in return?Do you feel like taking a look at it?![]()
What do I get in return?![]()
![]()
Craig, I am working on the Prius for ya
You've done more work than I have here Craig. For that, I "pre-deposit" my cheque in your account.ExcellentI'll expect it about the time Adam recieves my cheque (check for those who prefer not to spell things correctly)
![]()
Oh...I forgot to link the VDSID field in tblSETRModels to the VDS_ID field in tblVDSs in the relationship view and enforce referential integrity etc. You should probably do that too.
I think the part that is screwing me up is that the values I need to appear in the combo boxes aren't all from one table.
It didn't like it when I tried to change the model
For that, I "pre-deposit" my cheque in your account.
Well, it sure won't buy you a Prius, but coincidentally, it will buy you a tank of gas for it!$4.50 will buy me a triple-shot 20 oz Mocha![]()
Very few people understand this phenomena, and I'm actually surprised you said it!The list of values and information for combo boxes can be drawn from many related tables, but only one field from that list can ever be stored.
Not really 100% true. There is only one bound field for a combo, but it's quite possible to use, say, the AfterUpdate event to populate other fields from the combo.Two is that they display a list of possible values to be stored, and a bunch of associated information about those values. This associated information makes the data readable by humans. The list of values and information can be drawn from many related tables, but only one field from that list can ever be stored.
Of course I was meaning one field can be stored (bound) by that combo control. You are, of course, correct about being able to populate other controls/fields with information from the remainder of the row source sql fields. Thanks for catching that Neil.Not really 100% true. There is only one bound field for a combo, but it's quite possible to use, say, the AfterUpdate event to populate other fields from the combo.
Not quite sure why you're surprised. Surprised I understand it? Surprised I screwed it up? Surprised I can articulate a concept in less than three chapters of a novel?Very few people understand this phenomena, and I'm actually surprised you said it!
Private Sub cboModelName_AfterUpdate()
Me.cboModelYear.RowSource = "SELECT tblSETRModels.ModelYearID FROM tblSETRModels WHERE " & _
"tblSETRModels.ModelNameID = [cboModelName]"
End Sub
Private Sub cboModelYear_AfterUpdate()
Me.cboVDS.RowSource = "SELECT tblSETRModels.VDS_ID FROM tblSETRModels WHERE " & _
"tblSETRModels.ModelYearID = [cboModelYear]"
End Sub
SELECT tblModelYear.ModelYearID, tblModelYear.ModelYear
FROM tblModelYear INNER JOIN tblModels ON tblModelYear.ModelYearID = tblModels.ModelYearID
WHERE (((tblModels.ModelNameID)=[Forms]![fmSETR]![subformSETRModels].[Form]![cboModelID]))
GROUP BY tblModelYear.ModelYearID, tblModelYear.ModelYear
ORDER BY tblModelYear.ModelYear;