I have a form where the user selects the records they want to see before going to the data entry form. The code on the selection form is on the On Click Event of a frame and is as follows:
If frameSelectSite = 1 Then DoCmd.OpenForm "frmDataEntry", , , "Group = 'Central/Scat Management'" Else
If frameSelectSite = 2 Then DoCmd.OpenForm "frmDataEntry", , , "Group = 'Dunedin Management'" Else
If frameSelectSite = 3 Then DoCmd.OpenForm "frmDataEntry", , , "Group = 'Exchange Management'" Else
If frameSelectSite = 4 Then DoCmd.OpenForm "frmDataEntry", , , "Group = 'Hi-Rise Management'" Else
If frameSelectSite = 5 Then DoCmd.OpenForm "frmDataEntry", , , "ProjectName = 'McDonough Homes'" Else
If frameSelectSite = 6 Then DoCmd.OpenForm "frmDataEntry", , , "Group = 'Mt. Airy Management'" Else
If frameSelectSite = 7 Then DoCmd.OpenForm "frmDataEntry", , , "ProjectName = 'Roosevelt Homes'" Else
If frameSelectSite = 8 Then DoCmd.OpenForm "frmDataEntry", , , "Group = 'Valley Management'" Else
If frameSelectSite = 9 Then docmd.close
This code works fine. The user is brought into the data entry screen and only those selected records are available.
On the data entry screen, I have a find name box that the user can use to quickly move to a record by using a pick list. My problem is that I can't get the names in this box to list only the names chosen from the first selection form. Instead, all names are listed from the entire database.
The find name box is a combo box whose Row Source/Type property is a Table/Query. The Row Source property is:
SELECT qryDataEntry.ID, [LName] & ", " & [FName] AS Expr1 FROM qryDataEntry ORDER BY [LName] & ", " & [FName];
Does anyone have any ideas how I can change this to list only the names the user chose from the first selection screen? I've tried everything I can think of but can't make it work...thanks.
If frameSelectSite = 1 Then DoCmd.OpenForm "frmDataEntry", , , "Group = 'Central/Scat Management'" Else
If frameSelectSite = 2 Then DoCmd.OpenForm "frmDataEntry", , , "Group = 'Dunedin Management'" Else
If frameSelectSite = 3 Then DoCmd.OpenForm "frmDataEntry", , , "Group = 'Exchange Management'" Else
If frameSelectSite = 4 Then DoCmd.OpenForm "frmDataEntry", , , "Group = 'Hi-Rise Management'" Else
If frameSelectSite = 5 Then DoCmd.OpenForm "frmDataEntry", , , "ProjectName = 'McDonough Homes'" Else
If frameSelectSite = 6 Then DoCmd.OpenForm "frmDataEntry", , , "Group = 'Mt. Airy Management'" Else
If frameSelectSite = 7 Then DoCmd.OpenForm "frmDataEntry", , , "ProjectName = 'Roosevelt Homes'" Else
If frameSelectSite = 8 Then DoCmd.OpenForm "frmDataEntry", , , "Group = 'Valley Management'" Else
If frameSelectSite = 9 Then docmd.close
This code works fine. The user is brought into the data entry screen and only those selected records are available.
On the data entry screen, I have a find name box that the user can use to quickly move to a record by using a pick list. My problem is that I can't get the names in this box to list only the names chosen from the first selection form. Instead, all names are listed from the entire database.
The find name box is a combo box whose Row Source/Type property is a Table/Query. The Row Source property is:
SELECT qryDataEntry.ID, [LName] & ", " & [FName] AS Expr1 FROM qryDataEntry ORDER BY [LName] & ", " & [FName];
Does anyone have any ideas how I can change this to list only the names the user chose from the first selection screen? I've tried everything I can think of but can't make it work...thanks.