Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forms to include a note/memo field and autoupdates 1

Status
Not open for further replies.

jfussell

Technical User
Jul 17, 2001
66
US
I have a form that I would like to have the following capabilities:

1) Start out with no memo field on a tab, but the option (add button?) to add a new field for comments, possibly a popup field to enter the comments.
2) Once the comment is finished being typed, the user will click Save and then on the tab it will automatically display the date and time the comment was added and the first 3 lines of the comments.
3) As each additional comment is added, the latest previous comment will be adjusted downwards on the tab.

I'm pretty sure Access has all the capabilities to do this, but I wasn't able to locate any past inquiries/answers/FAQ to this type of form. Any guidance on this would be greatly appreciated. Thanks.
 
Hi

It depends to a degree what tables this form is attached to, but let's say for arguments' sake you have one main table you're looking at on the form. I would tackle it like this (not saying this is the definitive answer or anything...) :

1.Add another table on the many side of a one-to-many relationship with your main table - give it a Notes field (memo), a date-added field which defaults to Now(), and the foreign key from your main table
2.Create a subform on your tab, based on a query of the Notes table, with dates in descending order
3.Add some code to the 'OnCurrent' event of the main form to test for records in the subform - if no records make the sub invisible.
4.Add the button to make the subform visible and add a record
5.You'll need to tell the subform to requery after each new record

Not sure how you'd work the popup functionality into this... I realise this is only a rough outline, but hope it will help set you on your way.



42??? We're going to get lynched!
 
Hi,

Thanks for the suggestion, the subform is exactly what I did after I posted this question yesterday. I played with some subforms on my 'memo' tab and was able to see how it functions, and I included in my subform a Date() to show the current date (I've decided against the time). Would this Date() function work just about the same way as Now() except for showing the time stamp? If in the future this would cause a conflict then I'll try switching to the Now() instead. The subform seems to accomplish the basic concept of what I had in mind without the complications of creating buttons and additional hassle. Thanks again.
 
No worries. As you say, Date() and Now() work pretty much the same, apart from the time stamp.

Good Luck!

42??? We're going to get lynched!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top