Hello everyone,
Here is the situation. I've created two subforms that are based on the same underlying table - tblUnmatchedBrinks. I've also created two other subforms based on the same underlying table, in this case tblUnmatched Cadence. Now lets take the first two subform first - the ones based on tblUnmatchedBrinks. One subform displays all the underlying records in datasheet view. The second subform displays the data in form view, one record at at time. I want the user to be able to select a record in datasheet view and have that record displayed in form view in the formview subform. I need to do this for both sets of subforms on the same main form.
Here is what I've tried to do. In the datasheet subform on the form current event I've entered
hichRecord = Me.Database_ID
'MsgBox "The following record has been selected " & WhichRecord
MYRECORDSOURCE = "Select * From tblUnMatchedBrinks Where [Database Id]= " & WhichRecord & ";"
'Forms.frmMMRecon.subfrmUnmatchedBrinks1.Form.RecordSource = MYRECORDSOURCE
Where MYRECORDSOURCE is a variable having global scope. I've then set the subform (the one that displays records in formview) record source property to MYRECORDSOURCE. When I try to open the main form, access locks up. I've tried setting the formview subforms recordsource property from the other subform but it still doesn't work. I'll keep working at it. I know that the solution is pretty simple.
Here is the situation. I've created two subforms that are based on the same underlying table - tblUnmatchedBrinks. I've also created two other subforms based on the same underlying table, in this case tblUnmatched Cadence. Now lets take the first two subform first - the ones based on tblUnmatchedBrinks. One subform displays all the underlying records in datasheet view. The second subform displays the data in form view, one record at at time. I want the user to be able to select a record in datasheet view and have that record displayed in form view in the formview subform. I need to do this for both sets of subforms on the same main form.
Here is what I've tried to do. In the datasheet subform on the form current event I've entered
hichRecord = Me.Database_ID
'MsgBox "The following record has been selected " & WhichRecord
MYRECORDSOURCE = "Select * From tblUnMatchedBrinks Where [Database Id]= " & WhichRecord & ";"
'Forms.frmMMRecon.subfrmUnmatchedBrinks1.Form.RecordSource = MYRECORDSOURCE
Where MYRECORDSOURCE is a variable having global scope. I've then set the subform (the one that displays records in formview) record source property to MYRECORDSOURCE. When I try to open the main form, access locks up. I've tried setting the formview subforms recordsource property from the other subform but it still doesn't work. I'll keep working at it. I know that the solution is pretty simple.