Show Data from another Form

E

esee

I have two Forms (and Tables): BankProfile Form, and Addresses Form.
The Addresses Form has a two digit State Code in it.

When I show the BankProfile Form, I would like to show the State Code
from Addresses.

I don't know how to do this. Is the control on BankProfile Unbound,
or bound to what?

I have a combo box with the following SQL view, but I don't want to
select a value, I want it to fill in automatically.

SELECT tblAddresses.AddrID, tblAddresses.State, tblAddresses.BankID
FROM tblBanks INNER JOIN tblAddresses ON tblBanks.BankID =
tblAddresses.BankID
WHERE (((tblAddresses.BankID)=[Forms]![BankProfile]![BankID]));

Thanks for you suggestions...
 
D

Daryl S

esee -

You can have an unbound text box on your BankProfile Form, and put this in
it (assuming BankID is the name of a control on your BankProfile form that
has the bankid in it - adjust as needed):

=DLookup("State","tblAddresses","[BankID] = " & Me.BankID)

If BankID is a text field (rather than numeric, use this:

=DLookup("State","tblAddresses","[BankID] = '" & Me.BankID & "'")
 
E

esee

esee -

You can have an unbound text box on your BankProfile Form, and put this in
it (assuming BankID is the name of a control on your BankProfile form that
has the bankid in it - adjust as needed):

=DLookup("State","tblAddresses","[BankID] = " & Me.BankID)

If BankID is a text field (rather than numeric, use this:

=DLookup("State","tblAddresses","[BankID] = '" & Me.BankID & "'")

--
Daryl S

esee said:
I have two Forms (and Tables): BankProfile Form, and Addresses Form.
The Addresses Form has a two digit State Code in it.
When I show the BankProfile Form, I would like to show the State Code
from Addresses.
I don't know how to do this.  Is the control on BankProfile Unbound,
or bound to what?
I have a combo box with the following SQL view, but I don't want to
select a value, I want it to fill in automatically.
SELECT tblAddresses.AddrID, tblAddresses.State, tblAddresses.BankID
FROM tblBanks INNER JOIN tblAddresses ON tblBanks.BankID =
tblAddresses.BankID
WHERE (((tblAddresses.BankID)=[Forms]![BankProfile]![BankID]));
Thanks for you suggestions...
.

Yes Sir, that's it. Thank you...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top