User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MS Access and FileMaker Pro section within the Web Development category of DaniWeb, a massive community of 423,511 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,646 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS Access and FileMaker Pro advertiser: Programming Forums
Views: 2074 | Replies: 1
Reply
Join Date: Aug 2007
Posts: 6
Reputation: pablavo is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
pablavo pablavo is offline Offline
Newbie Poster

Question combo box with related records

  #1  
Sep 15th, 2007
Its' quite a long question but I've explained it the best way I know how

I have two subforms within a main form.
Each of the subforms are not directly related at the table level.
one subform is for project payments, the other is for the project bank details.
Because each project can have several payments, this means that there can be several records for both subforms.

On the bank Details subform I've made the PK id visible so just for example sake, if there are three records, the ID's might be 01,02,03.

because I need some way of knowing which bank details go with which payment ive updated the BankID PK on the payment table so that I can also show the BankID on the payment subform.
To show the specific bank details that were used for the specific payment the user will use the navigation buttons until for example both the payment and bank subform say 01.

What I want to do is have a combo box on the payment subform that will, for example, list the three records (01,02,03) but when I try this it gives me all of the bank PKs within the table (3000 or so) instead of limiting it to the three records within the specific project


Does any one know how to limit it to just the related records within the combo box?

Any help would be appreciated.
Last edited by pablavo : Sep 15th, 2007 at 9:32 am.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2007
Location: Far reaches of known space
Posts: 58
Reputation: Temmu is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 4
Temmu's Avatar
Temmu Temmu is offline Offline
Junior Poster in Training

Re: combo box with related records

  #2  
Sep 18th, 2007
write a query and base the form on that query.
in one of the query's columns use something like this to limit the results: (this is the sql view)
WHERE (((PL.Store)=[forms]![frmtest]![cmbstore]))
(the design view of the column is simply
[forms]![frmtest]![cmbstore]

now, as you my know, you are looking at a field on a form (in this case the form, frmtest) ant the field is of course, cmbstore.

so in a previous form (which you will now create) that field exists. the user opens that form first. when the user opens the form you described, the user has already put in the appropriate info for the query to limit the results to your (let's say) 3 rows.

hth...
(o) Yes, I'd like to reboot my computer now.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb MS Access and FileMaker Pro Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the MS Access and FileMaker Pro Forum

All times are GMT -4. The time now is 4:37 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC