Getting information from another form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have two forms. The main form is where the user selects the company from a
combo box. After that they have the option of browsing through different
sections of the records, eg the branches or user details or computer details
etc through buttons that are set out below the combo box.

The second form is the details of the company depending on which button they
click. For example, if they choose the company SCS then click on branches, a
list of the branches of SCS comes up.

Each company has a unique CompanyID number which is the link between the two
tables, tblCompany and tblBranch.

How can I carry over to the second form, that the company that was selected
was SCS and to show only branch details for SCS?

Thank you
Saima
 
Make query with next fields: Company name from tblCompany; rest of fields
get from tbl Branch:
Then in Criteria of field Company name put this: Forms![name of main
form]![name of combo box]
The second form use that query as data source.
When you click on button for open second form, access run query end filter
data with your criteria.

I hope this will help.
fahre
 
Hi,

Thank you for your help, although I'm atill having a minor problems. I've
done like you said, and it all went well, except the last two textbox do not
display information. They are included in teh query and have information to
display but its not displaying. Similarly with another form, the record in
Column 1 of the query is being displayed but the others are not.

?

Thanks
Saima

fahre said:
Make query with next fields: Company name from tblCompany; rest of fields
get from tbl Branch:
Then in Criteria of field Company name put this: Forms![name of main
form]![name of combo box]
The second form use that query as data source.
When you click on button for open second form, access run query end filter
data with your criteria.

I hope this will help.
fahre

Saima said:
Hello,

I have two forms. The main form is where the user selects the company from
a
combo box. After that they have the option of browsing through different
sections of the records, eg the branches or user details or computer
details
etc through buttons that are set out below the combo box.

The second form is the details of the company depending on which button
they
click. For example, if they choose the company SCS then click on branches,
a
list of the branches of SCS comes up.

Each company has a unique CompanyID number which is the link between the
two
tables, tblCompany and tblBranch.

How can I carry over to the second form, that the company that was
selected
was SCS and to show only branch details for SCS?

Thank you
Saima
 
Sorry not to worry I figured it out. Something to do with my column
count..silly mistake.

Thank you so much for your help! :)

Saima

fahre said:
Make query with next fields: Company name from tblCompany; rest of fields
get from tbl Branch:
Then in Criteria of field Company name put this: Forms![name of main
form]![name of combo box]
The second form use that query as data source.
When you click on button for open second form, access run query end filter
data with your criteria.

I hope this will help.
fahre

Saima said:
Hello,

I have two forms. The main form is where the user selects the company from
a
combo box. After that they have the option of browsing through different
sections of the records, eg the branches or user details or computer
details
etc through buttons that are set out below the combo box.

The second form is the details of the company depending on which button
they
click. For example, if they choose the company SCS then click on branches,
a
list of the branches of SCS comes up.

Each company has a unique CompanyID number which is the link between the
two
tables, tblCompany and tblBranch.

How can I carry over to the second form, that the company that was
selected
was SCS and to show only branch details for SCS?

Thank you
Saima
 
Back
Top