473,399 Members | 3,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Getting Access vba connection string to identify the user

Ok, I've tried searching, and haven't found the answer, so it must mean
everyone else but me already knows this. I have an Access 2000 form
that I want to connect to an Access 2000 table in the same database.
What I am able to do is create a connection string, explicitly giving
my admin-level userId and password, and it works. But when I try to
create a connection string that doesn't use this explicit definition, I
get permission issues, and no data. How do I get the form (and vba
code) to use the user's permission level to query the tables? We are
using an .MDW file to define user accounts, and the person who created
this app did things the hard way: gave each individual user their own
permissions, instead of user groups.

Sep 1 '06 #1
3 3115
bl*****@carolina.rr.com wrote in
news:11*********************@h48g2000cwc.googlegro ups.com:
Ok, I've tried searching, and haven't found the answer, so it must
mean everyone else but me already knows this. I have an Access
2000 form that I want to connect to an Access 2000 table in the
same database. What I am able to do is create a connection string,
explicitly giving my admin-level userId and password, and it
works. But when I try to create a connection string that doesn't
use this explicit definition, I get permission issues, and no
data. How do I get the form (and vba code) to use the user's
permission level to query the tables? We are using an .MDW file
to define user accounts, and the person who created this app did
things the hard way: gave each individual user their own
permissions, instead of user groups.
Just create a link to the table and then bind the form to the
appropriate recordsource.

There is no code needed for this, nor a need to specify a connection
string, except, perhaps in creating the link to the table (if it's
an ODBC data source, for instance).

Sounds to me like you're making things too complicated.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Sep 1 '06 #2
Thanks for the advice. Now let me expand the problem, and ask a couple
other questions as well:

What if the form I have has several tabs, and each tab needs
information from multiple tables? They are all currently linked
tables, but I don't think I can specify one table to any tab, since
multiple tables are needed for each tab. Do I just create a query as
the rowsource for each one?

In this scenario, how much performance gain should I see by using an MS
SQL Server backend instead of an Access database? If an average
"form-fill" time is currently 3-5 seconds, what could I expect from
this move?

Is it generally faster to set the rowsource to the form than using VBA
to connect and query?

Thanks again for your help. I've been working on Access forms for
about six months now, so I still have some things to learn.

David W. Fenton wrote:
bl*****@carolina.rr.com wrote in
news:11*********************@h48g2000cwc.googlegro ups.com:
Ok, I've tried searching, and haven't found the answer, so it must
mean everyone else but me already knows this. I have an Access
2000 form that I want to connect to an Access 2000 table in the
same database. What I am able to do is create a connection string,
explicitly giving my admin-level userId and password, and it
works. But when I try to create a connection string that doesn't
use this explicit definition, I get permission issues, and no
data. How do I get the form (and vba code) to use the user's
permission level to query the tables? We are using an .MDW file
to define user accounts, and the person who created this app did
things the hard way: gave each individual user their own
permissions, instead of user groups.

Just create a link to the table and then bind the form to the
appropriate recordsource.

There is no code needed for this, nor a need to specify a connection
string, except, perhaps in creating the link to the table (if it's
an ODBC data source, for instance).

Sounds to me like you're making things too complicated.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Sep 1 '06 #3
bl*****@carolina.rr.com wrote in
news:11*********************@74g2000cwt.googlegrou ps.com:
What if the form I have has several tabs, and each tab needs
information from multiple tables? They are all currently linked
tables, but I don't think I can specify one table to any tab,
since multiple tables are needed for each tab. Do I just create a
query as the rowsource for each one?
A subform on each tab, each with its own recordsource?
In this scenario, how much performance gain should I see by using
an MS SQL Server backend instead of an Access database?
Your question is like asking "how long is a piece of string?" There
is simply no way to answer it with the information given. However, I
would say that I've seen and used the design you describe in dozens
of Access databases using Jet back ends that had no performance
problems whatsoever, even with 100s of thousands of records and a
couple dozen simultaneous users.
If an average
"form-fill" time is currently 3-5 seconds, what could I expect
from this move?
I have no idea. That sounds incredibly slow to me to begin with. How
many records are involved?
Is it generally faster to set the rowsource to the form than using
VBA to connect and query?
The fastest is a bound form with a defined recordsource is going to
be fastest. But you have to decide whether your tab form should have
a recordsource at all. Are you presenting data that's child records
of a parent record? If not, then I don't know why you're using a
tabbed form in the first place.
Thanks again for your help. I've been working on Access forms for
about six months now, so I still have some things to learn.
Sounds to me like you're trying to make the whole thing too hard.
Just use plain old point-and-click techniques, with forms and
subforms with recordsources set at design time.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Sep 1 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Andrew Arace | last post by:
I scoured the groups for some hands on code to perform the menial task of exporting table data from an Access 2000 database to Oracle database (in this case, it was oracle 8i but i'm assuming this...
16
by: Rob Geraghty | last post by:
I've just spent some time looking through FAQ sites and searching the google archives of this newsgroup, but I still haven't been able to find a clear explanation of an issue with multi-user...
4
by: Arsalan Ahmad | last post by:
Hi all, I have a MS Access database (say abc.mdb). I have set the database password and admin password to "abcdefg" (say). The problem is that when I create a simple application (a form-based...
11
by: Siv | last post by:
Hi, I seem to be having a problem with a DataAdapter against an Access database. My app deletes 3 records runs a da.update(dt) where dt is a data.Datatable. I then proceed to update a list to...
8
by: Greg Strong | last post by:
Hello All, The short questions are 1 Do you know how to make DSN connection close in Access to Oracle 10g Express Edition? &/or 2 Do you know how to make a DSN-less pass-through query...
1
by: garry.oxnard | last post by:
Can anyone help me to solve a problem which involves switching from Access to Excel (then back to Access) programatically please? I have an Excel template which, on open, also opens an Access...
21
by: lesperancer | last post by:
I've got an access97 reporting mdb that pulls data (77,000 rows) from a sql server table into a local table to run reports if the local table is part of the reporting MDB, the insert statement...
9
by: =?Utf-8?B?UmF5?= | last post by:
Have SQL server on one machine. Have IIS on another machine in same large intranet. Have website in IIS with Basic Authentication turned on and other options deselected. Have webpage (.aspx) with...
1
by: dellis | last post by:
Problem: My project was initially created without putting passwords in the connection string. When I added the password in the connection string, it disappears when performing a database fill. I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.