A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

split db forms



 
 
Thread Tools Display Modes
  #1  
Old March 24th, 2010, 05:50 PM posted to microsoft.public.access.forms
QB
external usenet poster
 
Posts: 150
Default split db forms

I have a split db used over a network. I have read one shouldn't set the
form's recordsource to a table.

So what should be done? And then how do you set the sub-form's link
properties since the main form isn't bound?

I want to do things right, but would need to someone to give me a global
prespective so I can try and understand a little better.

QB
  #2  
Old March 25th, 2010, 05:24 AM posted to microsoft.public.access.forms
Allen Browne
external usenet poster
 
Posts: 11,706
Default split db forms

If the data is in Access (JET) tables (i.e. not linked to some other kind of
database), and you don't expect to have hundreds of thousands of records in
your table, then you can just bind the form to your table.

There may be reasons why you want to use a query (choose only some records,
specify a sort order, create some calculated fields, ...) but the reality is
that Access is very good at figuring out how to handle the data from a
table, even over a network. So, assuming a correctly designed table (has a
primary key, suitably indexed fields, correctly normalized), it doesn't
matter whether you use a query or not.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.


"QB" wrote in message
...
I have a split db used over a network. I have read one shouldn't set the
form's recordsource to a table.

So what should be done? And then how do you set the sub-form's link
properties since the main form isn't bound?

I want to do things right, but would need to someone to give me a global
prespective so I can try and understand a little better.

QB


  #3  
Old March 25th, 2010, 01:33 PM posted to microsoft.public.access.forms
QB
external usenet poster
 
Posts: 150
Default split db forms

Allen,

I have hundreds of thousands of records in my table, so what is the best
approach in this instance?

QB





"Allen Browne" wrote:

If the data is in Access (JET) tables (i.e. not linked to some other kind of
database), and you don't expect to have hundreds of thousands of records in
your table, then you can just bind the form to your table.

There may be reasons why you want to use a query (choose only some records,
specify a sort order, create some calculated fields, ...) but the reality is
that Access is very good at figuring out how to handle the data from a
table, even over a network. So, assuming a correctly designed table (has a
primary key, suitably indexed fields, correctly normalized), it doesn't
matter whether you use a query or not.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.


"QB" wrote in message
...
I have a split db used over a network. I have read one shouldn't set the
form's recordsource to a table.

So what should be done? And then how do you set the sub-form's link
properties since the main form isn't bound?

I want to do things right, but would need to someone to give me a global
prespective so I can try and understand a little better.

QB


.

  #4  
Old March 25th, 2010, 02:38 PM posted to microsoft.public.access.forms
Allen Browne
external usenet poster
 
Posts: 11,706
Default split db forms

For tables of that size, you probably want to provide your own navigation
mechanism, and load a very limited number of records into the form.

For example, say you have 500k accounts, each with a unique account number.
You bind your form to a SQL statement that initially returns no records,
e.g.:
SELECT Accounts.* FROM Accounts WHERE (False);

In the Form Header, you provide a text box where the user enters the account
number they want to find. If AcctID is a Text field, and this unbound text
box is named txtAcct2Find, its AfterUpdate event procedure does this kind of
thing:

Dim strSql As String
If Me.Dirty Then Me.Dirty = False 'save first
strSql = SELECT Accounts.* FROM Accounts WHERE AcctID = """ &
Me.txtAcct2Find & "";"
'Debug.Print strSql
Me.RecordSource = strSql

If you need to provide multiple search boxes where the user can enter
combinations of criteria, you might want to download this example and see
how it works:
Search form - Handle many optional criteria
at:
http://allenbrowne.com/ser-62.html
It actually builds a WHERE clause and applies it as a Filter, but you would
do exactly the same thing to use it in the WHERE clause of the SQL
statement.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.


"QB" wrote in message
...
Allen,

I have hundreds of thousands of records in my table, so what is the best
approach in this instance?

QB





"Allen Browne" wrote:

If the data is in Access (JET) tables (i.e. not linked to some other kind
of
database), and you don't expect to have hundreds of thousands of records
in
your table, then you can just bind the form to your table.

There may be reasons why you want to use a query (choose only some
records,
specify a sort order, create some calculated fields, ...) but the reality
is
that Access is very good at figuring out how to handle the data from a
table, even over a network. So, assuming a correctly designed table (has
a
primary key, suitably indexed fields, correctly normalized), it doesn't
matter whether you use a query or not.

"QB" wrote in message
...
I have a split db used over a network. I have read one shouldn't set
the
form's recordsource to a table.

So what should be done? And then how do you set the sub-form's link
properties since the main form isn't bound?

I want to do things right, but would need to someone to give me a
global
prespective so I can try and understand a little better.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:58 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.