Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Business Applications
Tag Cloud
access acer asus bios bsod computer crash desktop driver drivers error ethernet excel freeze gaming hard drive hardware hdmi internet laptop malware memory modem monitor motherboard mouse network printer problem ram registry repair router slow software sound trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Software & Hardware > Business Applications >
Access Databases

Reply  
Thread Tools
eddie5659's Avatar
Computer Specs
Moderator & Malware Removal Specialist with 25,165 posts.
 
Join Date: Mar 2001
Location: Bradford, England
13-Aug-2010, 11:49 AM #1
Access Databases
Hiya

In the process of creating an Access database for work, using Office 2003. I've created a nice report feature, a lovely form and the tables etc.

One thing I do want to have happening, is that when you use the computer (everyone logs in with a username/password on the network), and open up the program, it logs you in to the form, so that it displays your name.

That way, when you enter the details into the form, its created in the table for your actual login id.

At the moment, I've just created the form where you have to manually type the login into the form, but if I can get it to work automatically, that would be a bonus

Plus, sorting the Date option out, using the =Now(), but trying to sort that out later.

Any ideas, let me know, I'm all ears

No internet at home for a few days, but can reply on Monday

Thanks

eddie
__________________
Just go with the flow, like a twig on the shoulders of a mighty stream

Proud Member of ASAP, Alliance of Security Analysis Professionals
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 14,665 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
13-Aug-2010, 12:39 PM #2
eddie, the best function to use for the date option is
Date()

the Now() function has the time as well as the date and can make date matching in queries very tricky.

For the user ID use
environ("username")
eddie5659's Avatar
Computer Specs
Moderator & Malware Removal Specialist with 25,165 posts.
 
Join Date: Mar 2001
Location: Bradford, England
16-Aug-2010, 06:32 AM #3
Excellent, thanks OBP

I'll have a tinker tonight, and hopefully my internet will be up and running, and I can reply direct

Thanks again

eddie
eddie5659's Avatar
Computer Specs
Moderator & Malware Removal Specialist with 25,165 posts.
 
Join Date: Mar 2001
Location: Bradford, England
30-Aug-2010, 03:26 PM #4
Finally back, OBP

Looking at the database now, whereabouts do I enter the Date() into?

I'm looking at the Form, in Design View.

In there, I click on the option to open the Main Properties, and then I'm stuck.

This is the screenshot of the Form Properties...




In my database at the moment is a date and login field, for the user to manually enter the details. However, if this is automatically created, I can omit them, making it much easier to use


Once I have these parts done, then I can just work on the final touches, and then send it to work, for testing and see if they want other parts added/removed.

Then, I may be getting a bigger project to work on (oooo, overtime )

Thanks again

eddie
__________________
Just go with the flow, like a twig on the shoulders of a mighty stream

Proud Member of ASAP, Alliance of Security Analysis Professionals
slurpee55's Avatar
Computer Specs
Distinguished Member with 7,837 posts.
 
Join Date: Oct 2004
Location: Southwest Iowa....
Experience: Currently stupid...
30-Aug-2010, 06:09 PM #5
I would go to the original table and insert the two variables there, with Date() and =Environ("username") (note - not environ("username"), the lowercase environ isn't seen as a command) and put those in as the Default Values.
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 14,665 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
31-Aug-2010, 05:15 AM #6
When you get the Form properties that you show, click on the date field where you want the date to be automatically entered and find the "Default Value" property.
slurpee55's Avatar
Computer Specs
Distinguished Member with 7,837 posts.
 
Join Date: Oct 2004
Location: Southwest Iowa....
Experience: Currently stupid...
31-Aug-2010, 11:34 AM #7
OBP, MS says here:
http://office.microsoft.com/en-us/ac...010096451.aspx
"Typically, you add a default value to your table fields. You add the value by opening the table in Design view and then entering a value in the Default Value property for the field. If you set a default value for a table field, Access applies your value to any controls that you base on that field. If you don't bind a control to a table field, or you link to data in other tables, you set a default value for your form controls itself."
However, having successfully worked with you a fair deal (and been frustrated with MS on several occasions,) I would like to know why you suggest using the Default Value in the Form rather than the Table? I know you have done this in other things we have worked on in the past - does having it in the Table potentially, for instance, cause a constraint upon some other things?
__________________
Iowa? I could have sworn this was heaven.
Well, I think I can answer this question most successfully in mime.
My theme song... | Affero - rate me!
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 14,665 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
31-Aug-2010, 12:16 PM #8
Slurpee, I have never really thought about it. I hardly ever work with Tables directly. The only time is when formatting Autonumbers and in that case you have to format both the table and Form fields.
slurpee55's Avatar
Computer Specs
Distinguished Member with 7,837 posts.
 
Join Date: Oct 2004
Location: Southwest Iowa....
Experience: Currently stupid...
31-Aug-2010, 12:19 PM #9
I wonder if it makes VBA simpler, since often you code in the form and use the Me.(whatever) form of command - telling it to look at the named field in the open form.
eddie5659's Avatar
Computer Specs
Moderator & Malware Removal Specialist with 25,165 posts.
 
Join Date: Mar 2001
Location: Bradford, England
07-Sep-2010, 03:16 PM #10
Hi, late again, but was trying to see what I was to do, but can't figure out exactly.

Treat me as a beginner

For the Date to appear, I was thinking of it to appear actually embedded onto the form, same with the login name.

So, here is a screenshot:


This is what it looks like at the moment:





And these I want removed:





And become embedded when you open up the form, to enter the details:




---------------

So, when it gets opened by anyone, the date and login changes as per the time and the user that opens it.

Is there anyway to do this?

Thanks

eddie
__________________
Just go with the flow, like a twig on the shoulders of a mighty stream

Proud Member of ASAP, Alliance of Security Analysis Professionals
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 14,665 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
08-Sep-2010, 05:38 AM #11
I would suggest that you Compact & repair the database with a new name and then zip it up and put it on here.
Do you want the login and Date stored in the table?
eddie5659's Avatar
Computer Specs
Moderator & Malware Removal Specialist with 25,165 posts.
 
Join Date: Mar 2001
Location: Bradford, England
08-Sep-2010, 01:36 PM #12
Thanks

Yes, if possible. If you can tell me how its done after, that would be great.

Got other stuff to do, but this is my main priority.

Let me know when you have it, and I can remove the upload

eddie
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 14,665 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
08-Sep-2010, 01:39 PM #13
I have it now.
eddie5659's Avatar
Computer Specs
Moderator & Malware Removal Specialist with 25,165 posts.
 
Join Date: Mar 2001
Location: Bradford, England
08-Sep-2010, 01:40 PM #14
Thanks
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 14,665 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
08-Sep-2010, 01:54 PM #15
First of all I think the Table should be split into the People, The Assays and then the results of whatever the Form is for. This is called normallizing the data and it is what relational databases are all about. Repetitive data should only go in the tables once and then be referenced using it's ID number.
What do you think of that idea.
__________________
OBP
I do not give up easily
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools


Similar Threads
Title Thread Starter Forum Replies Last Post
WIP: Access & SQL Server Databases bladecs2002 Business Applications 31 06-Jan-2010 11:45 AM
Simple Access database problem dhari Business Applications 1 18-Nov-2009 05:09 AM
How to install Ms.Access Database on website? ipmart_computers Business Applications 6 10-Nov-2008 08:46 PM
Copy of Access database and linked tables Paintergrrl73 Business Applications 1 22-Oct-2008 04:44 PM


Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 12:41 AM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.