Thanks 2 Jeff Conrad, any idea bout "Security Issues"???

K

Kelly Lim

Hi Jeff...
Would like 2 thank you for the information regarding the Pop out message
and the url that u gave me....i'll give it a try and see how it goes.....but
then the other 2 urls cant work.....anyway...i'm also working out on the
"Security"...but then i cant seems to use the "Users & Groups Permission" and
"Users & Groups Accounts" both seems to confused me when i try to set
them.....Do u think u can help me with it?
Thanks again....
 
J

Jeff Conrad

in message:

Hi Kelly,
Would like 2 thank you for the information regarding the Pop out message
and the url that u gave me....i'll give it a try and see how it goes

You're welcome.
.....but then the other 2 urls cant work.....

Which URLs do not work?
anyway...i'm also working out on the "Security"...but then i cant seems to
use the "Users & Groups Permission" and "Users & Groups Accounts"
both seems to confused me when i try to set them....
Do u think u can help me with it? Thanks again....

Sure, I'd be happy to help.

Do not be too worried about Access Security, it *can* be a confusing
and difficult concept to grasp. Once you get the hang of ULS it is a very
valuable tool in your Access arsenal, however, it can be an uphill climb
mastering this particular subject.

The best advice I can give at this point, without knowing what study
material you have read, is to review all of the ULS documentation I
have accumulated here:

http://www.ltcomputerdesigns.com/JCReferences.html#Security

Do not expect to master this subject in an hour or even a day. Perseverance
and practicing on "dummy" databases is the best way to understand
this subject.

Once you have reviewed the information provided, I'd be happy to
walk you through any trouble spots you may be encountering. There
is also an entire newsgroup devoted to this subject where you
can review past questions and answers to help guide you along.

microsoft.public.access.security

Let me know how it goes.
 
K

Kelly Lim

Sorry Jeff....
Would like 2 ask bout the Birthday2k sample database that u gave
me?....its the coding part which i cant seems 2 do it.....At the Forms, then
"Open query" Properties ......."Event" which i wrote the coding using Visual
Basic right?.....but some part seems to confused me.....sorry bout it, but
the whole database which is the most important is this "pop out message"
function.....so i reli need to get this function on my database.....

Private Sub Form_Open (Cancel As Integer) >>What does the "Form_Open"
refers to?
Do i have to do coding on 3 modules in the VB? which is the "Query, Detail,
Form"??

Or maybe if there's other way which u can explain easier 4 u and me or if
copying 4 me the code in other ways.........coz im also confused now....
 
J

Jeff Conrad

in message:
Sorry Jeff....
Would like 2 ask bout the Birthday2k sample database that u gave
me?....its the coding part which i cant seems 2 do it.....At the Forms, then
"Open query" Properties ......."Event" which i wrote the coding using Visual
Basic right?.....but some part seems to confused me.....sorry bout it, but
the whole database which is the most important is this "pop out message"
function.....so i reli need to get this function on my database.....

Private Sub Form_Open (Cancel As Integer) >>What does the "Form_Open"
refers to?
Do i have to do coding on 3 modules in the VB? which is the "Query, Detail,
Form"??

Or maybe if there's other way which u can explain easier 4 u and me or if
copying 4 me the code in other ways.........coz im also confused now....

Hi Kelly,

When you post a response to a message please try and avoid changing
the Subject line itself. Many newsreaders will "mis-thread" the response
so people (possibly the person you are wanting to talk to) will miss
seeing the message. So try not to change the Subject line, OK?

The Birthday sample database is actually MVP Arvin Meyer's sample,
not my own. I will download a copy so I can have it in front of me.
I've also done something similar with appointment reminders so I
can look at that as well.

I first need to ask how much coding have you done before in Access?
I need to somewhat tailor my responses to your level.
 
K

Kelly Lim

Sorry....its my first time to this discussion groups...so im not quite sure
how exactly should i post it?.....but i'll take note....

Regarding the code....no...my level is just considered a beginner stage in
the VB.....before i used Access to do a project on asp connecting to it....so
i don have much coding to do .....
and then now i have to create a database...storing information of
crews.....and so this popping out window requires coding in Visual
Basic.....so i have no idea on how actually can i start on this function....
I'll be really glad if u can help me out on this particular function....
Thank you...
 
J

Jeff Conrad

in message:

Hi Kelly,
Sorry....its my first time to this discussion groups...so im not quite sure
how exactly should i post it?.....but i'll take note....

No problem. I thought you might be a little new at this newsgroup thing
so I wanted to get you going on the right foot.

You will find that these newsgroups are an incredible resource of information.
People from all over the world helping each other solve particular application
issues and it is all at your disposal. Since your new to the newsgroups this
particular link you may want to review sometime:

http://www.mvps.org/access/netiquette.htm
Regarding the code....no...my level is just considered a beginner stage in
the VB.....before i used Access to do a project on asp connecting to it....so
i don have much coding to do .....
and then now i have to create a database...storing information of
crews.....and so this popping out window requires coding in Visual
Basic.....so i have no idea on how actually can i start on this function....
I'll be really glad if u can help me out on this particular function....
Thank you...

OK, fair enough.

Well let's work on this together, OK?

In order for me to better understand your needs I will require some basic
information on your current setup. This will enable me to build a study database
to "see" what you see.

1. What Access version are you using?
2. What is the name of this table that holds the information you need to
be "reminded" of?
3. Can you list the important fields on this table and their data types for me?

Let's start there for now.
 
K

Kelly Lim

Thank you so much again...
Firstly.....im using Access 2003....and there's a few tables which i need
this function to remind me.....ok, it goes like this...
...the database im working on now is holding information on crews....i
will have to create different tables on individual information like
"Passport", "STCW", "Identity Card" and etc ...and i want to set a function
on the expiry date.....let's say...one of my crew passport is going to
expiry....i would like a pop out message on this "Passport" table (just like
how the BirthdaySample works) 1 week before the due date.......
so i can have time to prepare documents needed to be renew.....

i understand the part on the Queries and inserting formula in the
"criteria" ...but then at the "Forms" ...the Command on the coding....i cant
seems to make the coding works......coz i don quite understand some of
them.....
Hope this information is enough to help me starting......Thanks
 
J

Jeff Conrad

in message:
Thank you so much again...

No problem.
Firstly.....im using Access 2003....and there's a few tables which i need
this function to remind me.....ok, it goes like this...

Ok fine.
...the database im working on now is holding information on crews....i
will have to create different tables on individual information like
"Passport", "STCW", "Identity Card" and etc ...and i want to set a function
on the expiry date.....let's say...one of my crew passport is going to
expiry....i would like a pop out message on this "Passport" table (just like
how the BirthdaySample works) 1 week before the due date.......
so i can have time to prepare documents needed to be renew.....

i understand the part on the Queries and inserting formula in the
"criteria" ...but then at the "Forms" ...the Command on the coding....i cant
seems to make the coding works......coz i don quite understand some of
them.....
Hope this information is enough to help me starting......Thanks

Ok, let's start with the Passport table.
What are *your* field names in this table?
This will help me tailor something to your specific situation.
 
K

Kelly Lim

Passport table include fields:
Name, Rank, Expiry Date,Passport No.,Nationality

This would be the fields at the moment......
 
J

Jeff Conrad

in message:
Passport table include fields:
Name, Rank, Expiry Date,Passport No.,Nationality

This would be the fields at the moment......

Ok, very good, that will help.

I would seriously consider renaming the field called "Name."
Name is a reserved word in Access/Jet and Access will most
certainly get confused at some point. It would be better to
name it something PassportName. See this link for a list
of Reserved Words in Access:

http://www.ltcomputerdesigns.com/JCReferences.html#ReservedWords

I just had a thought. Is this "name" a person's name? If so
you **really** need to break that into separate fields like
LastName, FirstName, and MiddleInitial.

I will post back tomorrow with some ideas as I am heading off
to bed now.
 
K

Kelly Lim

Ok jeff,
I'll change it to Passport Name....yea ..its for the person's name.....so
i will break it down to FirstName and LastName...is that enough?? coz if
there's too much field for the Name....l'm worried i 'll get confused....
then i 'll just stop here...and pls post asap teaching me wat i have to do
next.....coz i hope it wont take too long for me in order to just finish this
function...... =)
 
J

Jeff Conrad

in message:
Ok jeff,
I'll change it to Passport Name....yea ..its for the person's name.....so
i will break it down to FirstName and LastName...is that enough?? coz if
there's too much field for the Name....l'm worried i 'll get confused....

If this is an actual person's name I implore you to make three fields:
LastName
FirstName
MiddleName

You will just have to trust me on this one. I like to think there are three main
rules to database design:
1. Backups
2. Backups
3. And backups

After those three important rules, number four would be:
4. Get the table design *correct* before doing anything else!

What happens a few months down the road when your boss says, "Hey Kelly,
we need you to add a field for middle name"? You will not only have to change
the table, you will also have to change all your queries, forms, and reports!
Not good!

I know you think it *may* be confusing now to have three separate fields
for the name, but PLEASE trust me when I say that it will be *more*
confusing having to break apart a full name into its component parts!

If you have not already, I would recommend that you study up on the topic
of Database Normalization:

http://www.ltcomputerdesigns.com/JCReferences.html#StartingOut

http://www.ltcomputerdesigns.com/JCReferences.html#TenCommandments

http://www.ltcomputerdesigns.com/JCReferences.html#DatabaseDesign101

http://www.ltcomputerdesigns.com/JCReferences.html#FiveDatabaseRules
then i 'll just stop here...and pls post asap teaching me wat i have to do
next.....coz i hope it wont take too long for me in order to just finish this
function...... =)

I will try and have something soon, but you must realize I need to do *my*
work as well.
:)
 
J

Jeff Conrad

Ok Kelly, here we go.

Follow the steps below. There are countless ways to do this,
but we'll follow Arvin's lead since you have already been
studying this.

1. Make a backup of your database.

2. Repeat step 1 please. :)

3. Open your own database and go to the Queries area.

4. Create a new query. When the dialog box that comes up prompting
for table and field names just hit cancel. You should have a blank
query design grid.

5. Switch to SQL view by going to View | SQL View on the main menu bar.

6. Now just copy and paste this SQL right into the SQL Editor window:

SELECT Passport.*
FROM Passport
WHERE (((Passport.[Expiry Date])<=Date()+7));

7. Save and close the query. Name the query: qryPassportsAboutToExpire

8. Create a new blank form with the following properties:

Caption - Passport Expiration Information
Allow Edits - Yes
Allow Deletions - Yes
Allow Additions - Yes
Data Entry - No
Scroll Bars - Neither
Record Selectors - No
Navigation Buttons - No
Dividing Lines - Yes
Auto Center - Yes
Pop Up - No
Modal - Yes

9. Create a new command button on the form, but do not put any
code attached to it just yet (just hit Cancel if the wizard comes up).
Change the name of the command button to cmdOpenQuery and
set the caption of the command button to Open the Query.

10. Now go to the Code window for the form (View | Code on the
main Access menu bar).

11. All you should see at the moment is this:

Option Compare Database
Option Explicit

12. Now copy and paste ALL of this code right **below** the top two
lines shown above on Step 11:

'**********Code Start**********
Private Sub cmdOpenQuery_Click()
On Error GoTo ErrorPoint

DoCmd.OpenQuery "qryPassportsAboutToExpire"

ExitPoint:
Exit Sub

ErrorPoint:
MsgBox "The following error has occurred:" _
& vbNewLine & "Error Number: " & Err.Number _
& vbNewLine & "Error Description: " & Err.Description _
, vbExclamation, "Unexpected Error"
Resume ExitPoint

End Sub

Private Sub Form_Open(Cancel As Integer)
On Error GoTo ErrorPoint
'************************************
' Name: Form_Open
' Purpose: Check Passport Expirations
'
' Author: Jeff Conrad - Access Junkie
' Date: May 4, 2005
' Comment: For Kelly
'************************************

Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim lngCount As Long

Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("qryPassportsAboutToExpire", dbOpenSnapshot)

lngCount = rst.RecordCount

If lngCount > 0 Then
MsgBox "There are Passports about to expire. Please " _
& "review the list to start the paperwork.", vbExclamation _
, "Passport Information"
End If

ExitPoint:
' Cleanup code
On Error Resume Next
rst.Close
Set rst = Nothing
Set dbs = Nothing
Exit Sub

ErrorPoint:
MsgBox "The following error has occurred:" _
& vbNewLine & "Error Number: " & Err.Number _
& vbNewLine & "Error Description: " & Err.Description _
, vbExclamation, "Unexpected Error"
Resume ExitPoint

End Sub
'**********Code End**********

13. Compile the code by going to Debug | Compile on the main menu bar.

14. Save and close the form. Name the form frmPassportExpiration

15. Now test opening the form. If there are passport expiration dates
within the next week you will get a message box just like Arvin's sample.
Once the form is open you can press the command button to see a list
of the upcoming passport expiration records.

16. Change any formatting on the form to suit your needs.

Will this work for you?
--
Jeff Conrad
Access Junkie
Bend, Oregon

in message:
 
K

Kelly Lim

Dear Jeff...b4 i start.......
i get wat u mean by future having to add the "Name" fields.....but i had a
question.....if its not the "Name" fields...wat about if my boss needs other
fields in the future as mayb he could miss out now......Would i have trouble
on that too? and even to change the coding too if i add more fields?

Do i have to add in the "Name" field in such way to initiate that's
Passport Name :
Passport_FirstName
Passport_MiddleName
Passport_LastName

How about other tables? like "Medical Certificate", "Identity Card" and
etc.....do i have to define the name too into:
Medical_FirstName.... (For Medical Table)
Medical_MiddleName

I.C. FirstName.....(For Identity Card Table)
I.C. MiddleName....
 
J

Jeff Conrad

in message:

Hi Kelly,
Dear Jeff...b4 i start.......
i get wat u mean by future having to add the "Name" fields.....but i had a
question.....if its not the "Name" fields...wat about if my boss needs other
fields in the future as mayb he could miss out now......Would i have trouble
on that too? and even to change the coding too if i add more fields?

Bosses have a nasty habit of wanting more things from time to time.
However, there is an upside to this. It is called job security.
:)

Yes, it can certainly be argued that you can never plan for just about
everything for the future. However, you can do your best to minimize them
by asking lots of questions now and getting feedback. This point of
the process is best done with pencil and paper. The computer should
only serve as a paperweight during this "thinking" process.
Do i have to add in the "Name" field in such way to initiate that's
Passport Name :
Passport_FirstName
Passport_MiddleName
Passport_LastName

How about other tables? like "Medical Certificate", "Identity Card" and
etc.....do i have to define the name too into:
Medical_FirstName.... (For Medical Table)
Medical_MiddleName

I.C. FirstName.....(For Identity Card Table)
I.C. MiddleName....

There is no right or wrong answer when it comes to naming fields. I have
seen many variations of naming conventions, but a good model to follow
is these:

http://www.ltcomputerdesigns.com/JCReferences.html#NamingConventions

The *best* advice on naming fields is to be consistent and to at least
follow these guidelines:
1. Try and avoid spaces in field names (not essential, but VERY good advice)

2. Try and keep them as short as possible, but easy to understand and descriptive
Avoid something like -
ThisIsAnExtremelyLongJustAbsolutelyOutrageousFieldNameForExample

3. Definitely avoid Reserved Words in Access/Jet:

http://www.ltcomputerdesigns.com/JCReferences.html#ReservedWords

4. Avoid special characters like ! @ # $ % ^ &, etc.

Hope that helps,
 
K

Kelly Lim

ok jeff..i have got the coding done already..and it works...i really
appreciate your help a lot, Thank you so much~~
Im manually keying some of my previous data from MS Excel to Access
now....."but" one of my collegue said there is possible ways of transferring
the Excel data into Access rather than needed to key in the whole data
again.......i'm not sure if its true....
So i would like 2 confirm with u ...if i really can do in such a way of
transferring....better than wasting a lot of time having to key in one by one
frm Excel to Access.....
 
K

Kelly Lim

i try "import" but then it came out some error in my Access....can i choose
the "columns" on MS EXCEL which i would like to import??
 
J

Jeff Conrad

in message:

Hi Kelly,
ok jeff..i have got the coding done already..and it works...i really
appreciate your help a lot, Thank you so much~~

Excellent, that is good news for sure!
You're welcome, I'm glad I could help.
Im manually keying some of my previous data from MS Excel to Access
now....."but" one of my collegue said there is possible ways of transferring
the Excel data into Access rather than needed to key in the whole data
again.......i'm not sure if its true....
So i would like 2 confirm with u ...if i really can do in such a way of
transferring....better than wasting a lot of time having to key in one by one
frm Excel to Access.....

I would suggest re-posting this question into the External Data newsgroup Kelly.
The general rule for newsgroup postings is that comments inside that thread
should pertain to the original question. This makes it easier to find answers to
questions later in the future. So, for example, if someone was having the same
type of problem you were having on the Birthday "tickler" code by Arvin they
can search and find this thread. However, if we start branching off into many
other subjects, that will confuse people. In addition, since these questions will
be buried inside this thread, you are less likely to receive help from other
knowledgeable people besides myself. See this link for some good newsgroup
posting tactics:

http://www.ltcomputerdesigns.com/JCReferences.html#Netiquette

Just start a new thread in the External Data newsgroup with your above questions
with a subject line of "First time linking Excel-Access. Can I link data?" or
something similar. That way you are more likely to receive lots of great help.
If you are using Microsoft's Web portal to access the newsgroups, then look
for the group called "Import/Export Data." If you have trouble finding that
group, post back and I'll guide you there.

Good luck!
 
Top