Help with Notes field and Date Stamp

G

Guest

Hi,

I've created a database to keep track of content in web pages. Since this is
a rather large site encompassing pages from several different department, I
would like to have a Notes field in a form to keep track of activities.

Using a command button named "View Notes" I link to another form called
"Notes". In the Notes form, someone will be able to view all of the notes
that have been written as well as insert new notes.

From what I've been reading, it's easier to create an unbound text box to
insert new notes and have a bound textbox to view all of the notes. I
understand this concept, however, I cannot for the life of me figure out how
to do this.

What I would like to do is have a text box where people can enter the notes
and then click on a "insert notes" command button and then the notes would
appear in the bound textbox with a date/time stamp.

I know there are instructions out there but I cannot follow them since I'm
very new to Access. Could someone please explain this step for me from
beginning to end using very easy-to-read instructions.

Thanks.
 
G

Guest

I'd have a very large textbox (labelled 'Notes') bound to the Notes column
which will need to be a Memo column. Make sure the control is scrollable
vertically. Call the control 'Notes'.
Under this, have a smaller text box labelled 'New Notes' and a command
button beside it labelled 'Add Note'. Call the control 'NewNotes'.
For the Add Note button, set up an 'OnClick' event procedure that does the
following:
Me!Notes = Me!Notes & " " & Me!NewNotes
Me!Notes.Refresh

There are a few complications, like if the user types in quotes among the
notes it can screw up the processing. That's another question for you.
Also you may need a 'zoom box' for the new notes field, look it up in
Access HELP.

Dorian
 
G

Guest

Under your command button put this line of code:
me.yourtextboxname=me.yourtextboxname & " " & Format(Date(),"mmm d,yyyy")

This will give you the text along with the date in a Oct 16, 2006 date.
 
G

Guest

I added the code you mentionned but I get this error message when I write a
note and click on Insert Note:

Microsoft Office Access can't find the macro 'me'.
The macro (or its macro group) doesn't exist, or the macro is new but hasn't
been saved. Not that when you enter the macrogroupname.macroname syntax in an
argument, you must specify the name the macro's macro group was last saved
under.

I'm have no experience in programming so I don't know what this "me" stands
for.
 
G

Guest

I got this code working but I had to remove this line...

Me!Notes.Refresh

The note appears in the text box like this...

Oct 17, 2006Here is my note

I would like the date to appear in red and have a space seperate the notes
from the date. Like this...

Oct 17, 2006: Here is my note.

Futhermore, when i add a second note, it appears right beside the the
previous note. I want the older note to be pushed down below when inserting a
new one. Please help!
 
G

Guest

Sorry...a couple of more problems I encountered.

I would like the text in the New Notes box to be cleared when the person
clicks on the command button. Also, the notes aren't saving because it says
"You cannot add or change a record because a related record is require in
table 'Page'.

The way my form works is that I have a main form 'Page' which is related to
a 'Pages' table. in the 'Page' form, there is a command button named 'View
Notes' which is linked to a another form named 'Notes'. When someone cliks on
the View Notes button, the 'Notes' form pops up. I would like for the person
to view the history of notes as well as be able to insert notes.

The 'Pages' table and 'Notes' table are related through the primary key
'Page ID'. Here are my fields in both tables:

Page: Page ID, Page Name, Last Modification Date, Reviewing Frequency, URL

Notes: Page ID, Notes

When I click on help in mentions that this "...operation would have violated
referential integrity...If you want to add or change the record, first add a
record to "one" table that contains the same value for the matching field." I
have no idea what this means. Is it because the relationship between the
Pages table and the Notes table is a many-to-many relationship? My guess is
that it is because a page can have more than one note and one note can have
more than one page?????
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top