Cable Forum

Cable Forum (https://www.cableforum.uk/board/index.php)
-   General IT Discussion (https://www.cableforum.uk/board/forumdisplay.php?f=19)
-   -   MS Access Guru sought? (https://www.cableforum.uk/board/showthread.php?t=15782)

zoombini 04-08-2004 15:27

MS Access Guru sought?
 
Hello world,

I am wanting to write a small MS Access 97 database to store the information of when a drawing is issued, keeping information in such as:

Drawing name,
issue,
description,
date of issue,
issued to,
issued by
comments.

"Date of issue" to be automaticaly put in (not sure how?)

"issued to" to be selected from a drop down list or overwritten. (I can do the dropdown, but overwriting?)

"issued by" to automaticaly be filled in by finding the windows username (yet overwritable). ((I have no idea where to start with this?)

Can anyone help or suggest ways of doing the ? marked bits above please.

Thankyou,

Stu038 04-08-2004 15:41

Re: MS Access Guru sought?
 
Quote:

Originally Posted by zoombini
"issued by" to automaticaly be filled in by finding the windows username (yet overwritable). ((I have no idea where to start with this?)

Not a great expert on this but my understanding is that you can't get Access to read the windows logon. I think it can only be done from enforcing a database logon. If I'm talking out of the rear orifice and someone show's you how it is done can you let me know how please :)

As for the overwriteing, in both cases you should be able to do it in the text box properties field, I can't remember exactly how. If I can get to a copy of Access in the next couple of days I'll have a nose and let you know.

Jon M 04-08-2004 15:42

Re: MS Access Guru sought?
 
the date field just has to be set as the data type "date/time"

to make a dropdown just use the data type "lookup wizard"

not sure about the username bit.. it would be better to create the database with specific users if you want to do that

gazzae 04-08-2004 15:45

Re: MS Access Guru sought?
 
To get the windows username http://www.techonthenet.com/access/modules/username.htm

I haven't used it so don't know how well it works.

gazzae 04-08-2004 16:00

Re: MS Access Guru sought?
 
If the database is just going to be used on NT, 2000, XP machines then you can just use =Environ("Username") to get the name

zoombini 04-08-2004 16:24

Re: MS Access Guru sought?
 
After having had a play I can see now that I can use "=CurrentUser" to make it put the Access users name in a field, however this also then means that I have to create a list of users etc that have access to it.

Not hard I suppose, the link above to use the windows logon name is way over my head, I just want to autofill a field when filling in a form not a query?

gazzae 04-08-2004 16:38

Re: MS Access Guru sought?
 
Quote:

Originally Posted by zoombini
Not hard I suppose, the link above to use the windows logon name is way over my head, I just want to autofill a field when filling in a form not a query?

Then instead of putting the getusername() in the query you would put =getusername() as the control source of the field in the form.

MovedGoalPosts 04-08-2004 17:51

Re: MS Access Guru sought?
 
To create a drop down list you are using a "lookup list" for the data field. that can either be from another data table, or you can create a small list embedded in the properties of the field. Use of another table is more versatile and easily changed if your data values are likely to alter.

In the properties for the field simply set "limit to list = No" to enable stuff other than what is in the dropdown to be entered.

Indians 04-08-2004 20:07

Re: MS Access Guru sought?
 
....for the date, set the field type to date/time then set the default value to =Now()

Also I would put the 'Issue' info in a seperate table linked to the main 'Drawing' table with the Drawing Number as the Primary key (link) you can then put the issue info in as a subform and have all the issue history together, assuming a drawing may be issued several times at different revisions.

Nemesis 04-08-2004 20:32

Re: MS Access Guru sought?
 
ok ... I've got one for you lot :D

Working on a Db, and I need to feed a date to a query ... preferably from a form.

i.e. get records added after date ..... the date is recorded on each record creation.

gazzae 04-08-2004 20:40

Re: MS Access Guru sought?
 
I'm at home, so can't remember exactly but if you want a query to get the date from the form then its in the query its something like [forms]![formname]![controlonform]

Indians 04-08-2004 20:51

Re: MS Access Guru sought?
 
IIRC, gazzae is correct, you could run the query from a control on the form along with a default value for say, today to get all the records from the inputed date to now.

greencreeper 05-08-2004 01:53

Re: MS Access Guru sought?
 
Quote:

Originally Posted by Indians
IIRC, gazzae is correct, you could run the query from a control on the form along with a default value for say, today to get all the records from the inputed date to now.

Yeah. An unbound form with a control to enter the date and a "Go" button to run the query.

There's an Access 2000 database here. It was part of an assignment when I was at Uni. It's not brilliant but it might be useful for ideas.

Indians 05-08-2004 10:04

Re: MS Access Guru sought?
 
If u want a small dbase to do 'Transmittals' let me know I have a blank in Access 97 u could use as a basis for your own.


All times are GMT. The time now is 17:25.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum