Kamis, 30 Juni 2011

Re: [MS_AccessPros] Linking several fields in a form.

 

Hello John,
I'm sorry I didn't say the Access version I was using, it's 2007. But what you told me, I understood, I tried it this way:

*On the Subform #1 with only Bank names that work with the shop, the fields linked are [Shop].
*On the Subform #2, the one I was concerned about, I linked
[Shop];[Name of Subform #1 that has the Banks for the Shop].Form![Bank]
with [Shop];[Bank]

And it worked correctly!
I didn't know you could use "compound links". I really appreciate the help.

Cesar Zulaica

--- In MS_Access_Professionals@yahoogroups.com, "John Viescas" <john@...> wrote:
>
> Cesar-
>
> You don't say which version of Access you're using. If you have 2003, there's
> an example in the Northwind sample database - the Customer Orders form. The
> outer form edits Customers, the first subform edits Orders, and the second
> subform shows the details for the selected order. The Link Master Fields
> property for the second subform looks like:
>
> [Customer Orders Subform1].Form![OrderID]
>
> .. where "Customer Orders Subform1" is the name of the first subform control.
>
> In your case, you probably want to use a compound link to the ShopID on the
> outer form and the BankId on the first subform. Something like:
>
> [ShopID];[BankSubform].Form![BankID]
>
>
> John Viescas, author
> Microsoft Office Access 2010 Inside Out
> Microsoft Office Access 2007 Inside Out
> Building Microsoft Access Applications
> Microsoft Office Access 2003 Inside Out
> SQL Queries for Mere Mortals
> http://www.viescas.com/
> (Paris, France)
>
>
>
> -----Original Message-----
> From: MS_Access_Professionals@yahoogroups.com
> [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of cesarmzp89
> Sent: Wednesday, June 29, 2011 8:40 PM
> To: MS_Access_Professionals@yahoogroups.com
> Subject: [MS_AccessPros] Linking several fields in a form.
>
> Hi everyone! I'm new on this forum, and this is my first post :).
>
> I have a Database that has a column of Shops, another one of Banks that operate
> through that shop and other data as Sales, Date, Number of Clients.
> I have a Shop catalog, a Bank catalog, a Banks and Shops they work with Catalog.
> They are all properly related with the Database.
>
> Each Shop works with different Banks, and each Bank works with different shops.
>
> I made a Form for each Shop that has a Subform (#1) that lists the Banks that
> work with it.
> And I made another form (#2) that lists Shops, Banks, Date, Sales, and Clients.
>
> I want to introduce this last form (#2) as a subform, that shows the Date, Sales
> and Clients for the Shop AND for the Bank that I click on the subform of banks.
>
> I know how to link the subform to each Shop, but it shows me all the banks.
> And I know how to link the subform to each Bank, but it shows me all the Shops.
> And Access only allows me to link one main and secondary variable on the
> Property tab of the subform.
> Is there any way of linking both of this fields to my subform?
>
>
> What I want is more less like this:
>
> (FORM) SHOP A
>
> Banks that Operate with this Shop
> (Subform1) | BANK A | <---If i click BANK A.
> | BANK B |
>
> History by Bank for this Shop
> (Subform2) |SHOP BANK DATE SALES CLIENTS|
> ----------------------------------------
> | A BANK A X1 Y1 Z1|
> | A BANK A X2 Y2 Z2|
> | A BANK A X3 Y3 Z3|
> | A BANK A X4 Y4 Z4|
>
> This subform only shows the results for this
> Shop, and for the Bank I clicked on Subform1.
>
>
> Thank you for your time!
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar