Forms

A

Andy

Hi,

I am using Access 2000.

I have created a small database. One of the fields is a text field and will
contain the history of each event. I have added a button to the main form
and I would like it to do the following:

when you press the add note button it will open a new form. The user can
then type the note and when press the save button it will add the text to
the history without deleting any previous history and also will stamp each
comment with date and time.

Is this possible and if so how do I do it?

Anguel
 
K

Klatuu

Assuming each event is unique and has a primary key, you will need a child
table to the event table. It will need 4 fields. Its own primary key, a
foreign key to the event, a date time field for the date time stamp, and a
memo field.

I would suggest you use a sub form to you event form to display, edit, or
add new notes.
 
A

Andy

Thanks,

I can crate the table. That's not a problem but:
- How would I display the full history with date stamp on the form?
- How do I add new notes to the history?

Many thanks.

Anguel
 
D

DM

Use a subform to display the history, you can then switch to a new record to
create a new history item.

If you set the date/time textbox to 'locked' and its default value to 'Now',
then when you create a new record, the date & time will be put in and the
user will not be able to change it or any previous records.
 
A

Andy

I am not really sure that I understand?

Which form does what and where?

Ideally I only need to be able to add notes to the notes field. For example
click a button with will clear the current content of the note field and put
it into a temporary place. when you save the not it will add the new text to
the notes field and append the previous content after.

I will have a go creating the table as you suggested.
1. I will create a table for the notes
2. I will establish relationship with the main table
From here I am lost.

Many thanks for your help.

Sorry, if I don't make sense

Anguel
 
D

DM

Make a new form using the wizard and when selecting the records to go into
it, select them from the event and history table, you should then be given
options to do with the subform after you click Next.

Once the new forms are created, close the main form and open the subform is
design view. Go into the form properties by right-clicking in the dark space
to the right of the form, choose the 'All' table and set Allow Edits = No,
Allow Deletions = No. This will stop user form changing old notes.

Now click on the Date/Time text box. Open its properties if they are not
open already. In default value put =Now() and set locked = yes.

Give it a try (I hope it does). Reply if it doesn't
 
Top