Hello all
I'm creating a database, but doing it a slightly different way than I have done in the past and I have encountered an issue I've not had before.
I have a main Menu, the main Menu button to Add new Employee Opens the Very First Form to add a new employee
The First Screen is where the company selects a company name from the list, and then moves to the next page to select a subsequent department. Sounds easy.
The relationships are:
tblCompanyName -
PK = CompanyNameID
Txt - CompanyName - unbound combobox on the form
The person updating clicks on the next button after selecting the companyname from the combo box CompanyName
Code:
DoCmd.OpenForm "frmAddNewEmployeeDepartment",,,[CompanyNameId] = " & Me![CompanyName],,,Me!CompanyName
Then on Open.
Code:
If Me.OpenArgs <> "" then
If Me![CompanyNameID].DefaultValue = "" Me.OpenArgs & ""
End If
The follow on page is the department in the company.
tblCompanyDepartment -
PK = CompanyDepartment
FK - CompanyNameID
Txt - CompanyDepartment
The follow on from this is the employee. I All my subsequent forms open fine and pass the openargs to the relevant tables and relationships all work, its just the very first step I'm stuck with.
When I am in the tblCompanyName - even though the PK is linked to the FK 1 to many, for tblCompanyDepartment, there is no value in tblCompanyName
Can someone suggest a solution as my queries will not pull down reports as the first table is blank.
Regards