Building a Recordset

yeatmanj

Loose Cannon
Local time
Today, 17:03
Joined
Oct 11, 2000
Messages
195
I'm getting brave now and moving into something I know nothing about.

The database opens up with a menu. A Site Manager clicks on the "Site Management" button, which then brings up a menu appropriate to that Site Management (with reports a manager needs, and data they need to view or edit. All buttons).

Now when the manager clicks "Site Management" I want it to ask what their name is, create a recordset based on that criteria.

They've entered their name, and the "Site Management" menu is in front of them. there are reports and forms for editing and viewing data. I don't want the recordset to apply to the view only forms, just the edit forms and reports.

Please, keep in mind that when you are answering this, I know absolutely nothing about creating recordsets with VBA or SQL. If there are sites that contain detailed explainations of this, i don't mind being refered. If you think you can explain it, please feel free. You can also email me at jyeatman@ene.com

Thank You all so much
 
What is the purpose of the recordset? Are you using it to hold a subset of some other information, intending to work with it on the screens?

Or are you really meaning to customize the user's screens???
 
Each user has his/her own sites. I want them to be able to view everyones sites, but only to be able to edit their own sites or print out reports that pertain only to their sites.
 
you can edit the record set by using :
"Ex name for record set = rst"
rst.edit
rst![fieldname]="what you want to put in field"
rst.update
 
not exactly what i'm looking for. I could be wrong, but I thank you for your help anyway.
 
Does each site have a unique ID which is referenced on all the forms reports etc?
 
Yes. FacID is the unique identifier for all forms, tables, reports, etc.
 
Maybe you could define a variable as public in a module put that on a form that you would keep open the entire run time and assign it a value on the same form that will always be open and use that assigned variable for the recordsets name at all the points where your user would edit the recordset the code might look something lik this:
'on a module declare the recordset name as global string
public myrst as string

then use a text box on the form to assign the value

myrst = me.sitename

then in the edit forms edit command button the code could look like this
dim rst as recordset, mydb as database

set mydb = currentdb
set rst = mydb.openrecordset myrst
rst.edit
rst![field name you want to edit] = "what ever you want that field to be"

rst.update

Just remember you can declare a variable public but that variables scope or life lasts only as long as the form where it resides. let me know if this helps even if it doesn't I would like to know what route you take this is interesting my email is jkc3computerhack@yahoo.com
good luck
John
 

Users who are viewing this thread

Back
Top Bottom