Hi,
ET is Calling Home again on the same subject... either I am dumb, but I just cannot seem to grasp how to pass the info on the one form to the other form. This is what I am trying to do.
1. Table 1... tblMaster with the following field - Record_Id (Autonumber - Primary Key), Building_Name (Text - using Lookup Combobox to populate), Room_Nbr (Number - using Lookup Combobox to populate), Capture_Date (Date) and Capture_Id (Text - using Lookup Combobox to populate)
2. Table 2... tblSlave with the same fields, except, the Record Id is not an autonumber and primary key only a Number and all the other fields do not use Lookup ComboBox to populate and additional fields like bathroom, room, closet, balcony. The intention here is to take the information from tblMaster and populate the data on tblSlave.
3. I created a Form called frmMaster and enter the necessary information, but I now want to populate the common info on the two tables. I created the relationship between the 2 tables.
4. I created a second Form frmSlave.
5. On frmMaster I created a cmd button using the wizard to open frmSlave. When I use this as is, it opens the frmSlave, but no data is pulled thru. When I change the event on click from embedded to event procedure and write the following code, it give me an error: Compile Error (Warning) Expected: =.
Private Sub Command66_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "FrmSlave"
stLinkCriteria = "Hotel_Name =" & Me.Hotel_Name
DoCmd.OpenForm(stDocName,acNormal, , ,acFormAdd, ,StLinkCriteria)
End Sub
Even though it is a warning, it does not even open the frmSlave when I use the code.
Please bear in mind that I am a novice when it comes to Access development, but a very knowledgable developer in Natural Adabas/Construct and Cobol and Cobol/CICS... yes! I am a legacy systems analyst and fully understand how the logic works with RDBMS. I can create tables and its relationship... queries, forms, reports.
IF what I am trying to do is not the way to go then can some please help me... you never know, you may need assistance in the programming language that I have over 20yrs experience in... so common guys/gals... help this old man...