Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 14th, 2009, 02:34 PM
Daj Daj is offline
Registered User
 
Join Date: Jan 2009
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Subformdrop down and data selection

I have been trying for a week now to get rid of the bugs in this form but I am obviously missing knowledge and information.. Hopefully you can help me.

Tables
- Tbl_customer contains info on client. Unique key is CCAN
- Tbl_dda_app: contains info on the client’s Approvals. Key is [dda_no] which is an autonumber
- Tbl_dda_ast: contains info on one or more Asset (record) per Approval. Each asset is numerated with the field [ast_no] starting at 1 for each Approval.
The key field is [app_no] which is the combination of = ast_dda_no & "-" & ast_no

Relationships
Tbl_customer.[ccan] ___ one to many ____ tbl_dda_app.[ccan]
Tbl_dda_app.[dda_no]__ one to many _____tbl_dda_ast.[ast_dda_no]

The business logic is as follow

1 The user selects the client in a drop down
2 In the application subform, the user can create or amend Application for that CCAN
3 In the asset subform, the user selects one of the Application for that client, then create /amend data located in tbl_dda_ast for the Assets related to the Application in a subform.

Steps 1 and 2 are working perfectly..

Main form [frm_dda] with recordsource [qry_frm_dda] with the data selection made by the combobox [cmb_frm_dda]. Selection is made by the field [ccan].

The Application subform [frm_sub_dda] with recordsource [qry_frm_sub_dda] lists all [dda_no] for the [ccan] selected.

I have an example of the database located at

http://www.4shared.com/file/105192585/439b5ec7/WCM-F-2000.html

My issues are

1- In the asset subform [frm_sub_ast], get the a drop down that list all [dda_no] selected in the previous subform [frm_sub_dda] that can be updated on the fly
2- Select from the drop down above the list of assets that have the same dda_no as the drop down.

Can someone point me in the right direction? After 100 or so attempts at this, I still cannot get the drop down updated when a new dda_no is created, or there are still several errors when an asset is created etc..

Thanks in advance.
 
Old May 28th, 2009, 12:40 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I looked at the database and there is no frm_sub_ast. Do you have another copy of this. You need to put an after update and after insert events on the subform to requery the other subform, I think. Do you have a copy with all the forms and subforms you mentioned?
__________________
mmcdonal

Look it up at: http://wrox.books24x7.com
 
Old May 28th, 2009, 01:57 PM
Daj Daj is offline
Registered User
 
Join Date: Jan 2009
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the reply. I amended the structure and found another way of doing this with a subform within a subform..





Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying hierarchical data for selection Broodmdh Classic ASP Basics 9 August 27th, 2008 08:18 PM
data selection and mapping with dropdownlist gagansharma7 ASP.NET 1.0 and 1.1 Basics 0 June 27th, 2006 11:41 AM
Data List Selection Norberto_Caraballo Beginning VB 6 1 June 24th, 2006 09:41 AM
No selection for a parameter krema Reporting Services 1 February 23rd, 2006 07:30 AM
Getting data based on field selection Trojan_uk Classic ASP Basics 1 December 9th, 2003 10:47 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.