willem
07-12-2001, 10:18 AM
how do i access a subdatasheet in vba (access 2000) and move to the next record still in vba .
thank's
thank's
subdatasheetwillem 07-12-2001, 10:18 AM how do i access a subdatasheet in vba (access 2000) and move to the next record still in vba . thank's jerryfchui 07-12-2001, 08:27 PM The subdatasheet are those records in another table that has a relationship with the current record. So, - you know the key and its data. The key that relates the two tables, say this is KeyA - you know what is the table for the subDataSheet you are seeing, say TableB I guess you could build an sql string based on the information KeyA and TableB. Then using this string to create a recordset. And so on. I do not know if this answers your question or not, as I do not know exactly your meaning of "move to the next record still in VBA". willem 07-13-2001, 12:41 PM i want to go to the next record in my subdatasheet, not manually but programmatically is that possible? If i can't move to the next record , my query stays empty. It may appear strange but that's just the way it is. It is hard to explain but as long as there are no more than one record in my subdatasheet , a query based on the primary table(with more than 1 record) and this foreign table stays empty. jerryfchui 07-15-2001, 07:33 PM Look, here is the statement to instantiate a recordset object to work with those records in the forign table. set myrecordset = dbasename.OpenRecordset(queryString,..) If the above makes sense to you, then we have the following methods to navigate the recordset programmatically: myrecordset.moveNext, myrecordset.movePrevious, myrecordset.moveFirst, etc. |
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum