Hi!
As fara as I know, Record Out of Range error occurs in case when you try to use 'GO' command for some cursor. I Use this command only with range cjecking, like following:
if between(m.lnRecordNumber,1,reccount())
go (m.lnRecordNumber)
endif
This may be also a problem inside of combobox (this is suggestion only, I never had this problem because never used view as row source). Say, you requery view, records in it disappeared, but combobox try to access these records by record number.
Try to use 'NONE' row source type instead of view. Just fill list by values from view in requery method of combobox.
>I have a Hotel Reservation system and the reservation form has two dropdown lists that are related. The first is a list of Hotels (cboHotels) rowsource 'fields' and the valid event stores the hotel ID (id_hotel) to a public variable (gnHotel). The second is a list of Room Grades (cboGrades) that hotel offers with the RowSource a View. Both of these are BOUND to the Reservation record.
>
>The View (vRoomGrades) has 4 fields "grade_desc,hot_grade,grade,id_hotel" and I perform REQUERY() passing 'gnHotel' from the cboHotels.Valid(). For the most part this works fine, yet when I navigate through the Reservation records (next,back) I get 'Record out of Range' with one hotel, yet there are records for that hotel. Where is the best place to call the Refresh() or Requery() for cboGrades, and what could be causing this abnormal behavior?
>
>Any ideas here would be helpful.
>Adam
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.