Re: Table comparison

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I was thinking along the lines, originally, of doing the following:

a text box on a hidden form, that gets the username that's logged into the
machine.
a linked table, that has a list of all of the valid users that may use the
database, and what forms they may open up.

On the same hidden form, a listbox that uses a row source that is a query of
the NameList table, with the criteria for the only field in the query using
the same GetUserID() that i use to get the username originally. My problem
was having it treat this as a string. you can't put In("GetUserID()" ) in
a criteria line.. which leads me to where i am now.


"Pwyd" wrote:

All right, fair question. At some point, i will be leaving the workplace i'm
at. They do work for a government contractor, which if you're not familiar
with them, means they don't change for many, many years at a time. So along
this line of thinking, and based on the current set of databases i've built
for them, i'm going to make a single external table for use as a "name list"
so that they can add and remove names from just that one table, and set up
access to several databases. It will be simple and to the point, and not
require any real knowledge to operate. What i'm using now is a set of VB
comparisons to strings. They have to be added and removed manually. I'm
still in the process of re-learning my SQL and my VB as i hadn't used them
for about 8 years previous to my current job.




"pietlinden@xxxxxxxxxxx" wrote:

On Jun 26, 1:56 pm, Pwyd <P...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
So

if [Blah].MailLog = "string"
then DoCmd.openQuery "queryname"

is a valid statement, for comparing an entire table's contents with
fieldname.databasename and so on being the correct syntax?

Okay, take a step backwards. Why are you trying to do this?
If you want to get all the records where a fieldname in a table in
your database = "string" then why not just open a query based on the
table and then process it in code?

dim qdf as dao.querydef
dim rs as dao.recordset

set qdf=DBEngine(0)(0).Querydefs("QueryName")
set rs=qdf.OpenRecordset
do until rs.eof
'send your e-mail here
rs.movenext
loop

rs.close


.



Relevant Pages

  • Re: access database field names in Javascript
    ... You need quotes around the string values, and you need to concatenate the ... > I trying to get information from a simple MS Access database named users ... > (username, password and stylesheet). ... > The database connection I'm using and where the SQLstr will be used is: ...
    (microsoft.public.access.formscoding)
  • Re: Table comparison
    ... "Pwyd" wrote: ... a text box on a hidden form, that gets the username that's logged into the ... database, and what forms they may open up. ... the same GetUserIDthat i use to get the username originally. ...
    (microsoft.public.access.modulesdaovba)
  • Re: php inserts into DB
    ... database...the only problem is that it doesn't put anything in the database. ... // checks if the username is in use ... die('Your passwords did not match. ... terminate the string and concatenate the variable, or use sprintf to format the string correctly. ...
    (comp.lang.php)
  • passing an Access variable to a page
    ... database and a third piece of information is retrieved. ... string to a webpage so it will obey the rules in the CSS. ... rows consist of the fields username, ...
    (microsoft.public.frontpage.programming)
  • Re: VB.Net and SourceSafeTypeLib
    ... Please select another database. ... > I am running VS 2003 and VSS 6.0. ... > public string OpenDB(string UserName, string PassWord, string Path) ...
    (microsoft.public.vstudio.sourcesafe)