Results 1 to 2 of 2
Thread: Listbox RowSource (A2000/A2003)
2005-05-18, 10:42 #1
- Join Date
- Jan 2001
- Chelsea, Gtr London, United Kingdom
- Thanked 0 Times in 0 Posts
Listbox RowSource (A2000/A2003)
This is just a 'heads-up' to anyone who is switching between Access 2000 and Access 2003.
I've been developing a database using Access 2000 SP3, which has a lot of listboxes and does a lot of setting and changing of RowSources.
The Help files say that you need to set the RowSourceType property to Table/Query or Value List or Field List before setting a RowSource using VBA.
Me.lstCourseType.RowSourceType = "Table/Query"
If arglstCampusVal = "ALL" Then 'All Campuses
Me.lstCourseType.RowSource = "qsrcLstCourseTypes"
Me.lstCourseType.RowSource = "qsrcLstCourseTypesC"
Access 2000 will happily work without you first setting the RowSourceType property in VBA if it is already set on the Listbox properties.
Access 2003 is much more fussy. If you do not explicitly set the RowSourceType first, it crashes and burns.
Be warned!Steve H
IT Lecturer/Access Developer
O2K SR3/O2010; Win7Pro
2005-11-17, 13:12 #2
- Join Date
- Jun 2001
- Crystal Beach, FL, Florida, USA
- Thanked 33 Times in 33 Posts