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 February 6th, 2009, 05:58 PM
Daj Daj is offline
Registered User
 
Join Date: Jan 2009
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Require better understanding of process flow

Hi all,

I have read as much as I could and I am still confused, so I am turning to the experts of this board.

Access 2003: have a form [frm_cst] that is populated by a query [qry_cst]. Record selection is made by the user through a combobox [cmb_cst] with a RowSource [qry_cmb_cst] with the [ccan] field. All very straight forward.

What I would like to understand is the loading order.

When the form [frm_cst] is opened, the query qry_cst is executed and loads in memory all the records of the query and the 1st record shows on the form, then the user selects the record with the combobox [cmb_cst] and the proper record shows up.

Would it be better and much faster that the form [crm_cst]loads, THEN the user selects the record with [cmb_cst] THEN the query [qry_cst] is executed with the [CCAN] selected in the combobox and displays the proper record?

Am I missing something here?
 
Old February 9th, 2009, 08:28 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Are you having issues with the speed with which the form loads? Too many records in the query?

You can give your user the option to select a record before the form opens and limit the form to that one record, then use the combo to select another record. That means the form only has one record open at a time. That can work quickly. You could also give the user a limited recordset by selecting only the top 100 from the initial query (those records last used) and then give them the combo to look up more reocrds, etc.

Did any of that help?
__________________
mmcdonal

Look it up at: http://wrox.books24x7.com
 
Old February 9th, 2009, 09:11 AM
Daj Daj is offline
Registered User
 
Join Date: Jan 2009
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You are right on the money...

There not much issues with local acess but with VPN, it's murder..

How would I go with having the user select a record before the forms open, then enable the combobox?
 
Old February 9th, 2009, 09:19 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Just create a combo box that looks up one or more fields in the table similar to the one that is already on the form for record navigation. Then use the button wizard to create a button to launch your form, and if it asks to limit the records based on a control on the current form, point it to the combo box.

It may be that you will have to create a different copy of your current form so that it does not load its own recordset. Just let it load the query with no parameters. The button that opens the form will supply the recordset, like:

Dim sPK As String
Dim sLink As String
Dim sForm As String

sForm = "MyForm"
sPK = Me.cboPKCombo 'check for a selection here

sLink = "[PKField] = '" & sPK & "'"

DoCmd.OpenForm sForm, , , sLink

This will open the form with one record. Then the user can use the combo on the form to look for other records. The after update event of the combo will need to refresh the recordset.

Did that help?
__________________
mmcdonal

Look it up at: http://wrox.books24x7.com
 
Old February 9th, 2009, 09:48 AM
Daj Daj is offline
Registered User
 
Join Date: Jan 2009
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I understand the concept.. great idea.. thanks..

Will make tests to see how the database reacts on VPN after that..

Thanks again





Similar Threads
Thread Thread Starter Forum Replies Last Post
process.startinfo opens new instance of process Anypond General .NET 0 August 28th, 2008 05:35 AM
require attribute - all but... kfir XML 2 May 28th, 2006 09:45 AM
Problem with include or require cli PHP How-To 2 May 24th, 2005 11:15 AM
Process flow diagram creator application madhukp VB How-To 0 November 12th, 2004 06:10 AM
include() vs require() kc5f Beginning PHP 2 May 23rd, 2004 10:04 PM





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