PC Review


Reply
Thread Tools Rate Thread

Automatically create comments based upon cell value and related datain database

 
 
dladilaco@gmail.com
Guest
Posts: n/a
 
      10th Apr 2008
Hi all,
I am creating a follow up system for car fleet management.
Is it possible to create a comment in a cell based upon the content in
that cell and a related database with the car details.
For example :
In a cell next to an employee name I fill in ABC123 (number plate) and
in the comment box I would like to see the details (Toyota Avensis
contract number 123456) This data exists in a database.
Thanks in advance for your feedback
Dirk
 
Reply With Quote
 
 
 
 
JLatham
Guest
Posts: n/a
 
      10th Apr 2008
What kind of database is the information you want in? Access, another Excel
worksheet, a different Excel workbook?
Regardless, this will no doubt be done with a Worksheet_Change() event
handling VBA macro.

"(E-Mail Removed)" wrote:

> Hi all,
> I am creating a follow up system for car fleet management.
> Is it possible to create a comment in a cell based upon the content in
> that cell and a related database with the car details.
> For example :
> In a cell next to an employee name I fill in ABC123 (number plate) and
> in the comment box I would like to see the details (Toyota Avensis
> contract number 123456) This data exists in a database.
> Thanks in advance for your feedback
> Dirk
>

 
Reply With Quote
 
Stefi
Guest
Posts: n/a
 
      10th Apr 2008
Try this Change event macro:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then ' "if number plate" column is e.g. A
Target.ClearComments
commtext = retrievefromDB(Target.Value) 'create your retrieve function
With Target.AddComment
.Visible = False
.Text commtext
End With
End If
End Sub

Regards,
Stefi

„(E-Mail Removed)” ezt *rta:

> Hi all,
> I am creating a follow up system for car fleet management.
> Is it possible to create a comment in a cell based upon the content in
> that cell and a related database with the car details.
> For example :
> In a cell next to an employee name I fill in ABC123 (number plate) and
> in the comment box I would like to see the details (Toyota Avensis
> contract number 123456) This data exists in a database.
> Thanks in advance for your feedback
> Dirk
>

 
Reply With Quote
 
dladilaco@gmail.com
Guest
Posts: n/a
 
      10th Apr 2008


JLatham removethis wrote:
> What kind of database is the information you want in? Access, another Excel
> worksheet, a different Excel workbook?
> Regardless, this will no doubt be done with a Worksheet_Change() event
> handling VBA macro.
>
> "(E-Mail Removed)" wrote:
>
> > Hi all,
> > I am creating a follow up system for car fleet management.
> > Is it possible to create a comment in a cell based upon the content in
> > that cell and a related database with the car details.
> > For example :
> > In a cell next to an employee name I fill in ABC123 (number plate) and
> > in the comment box I would like to see the details (Toyota Avensis
> > contract number 123456) This data exists in a database.
> > Thanks in advance for your feedback
> > Dirk
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create records automatically in related table? CW Microsoft Access 2 17th Apr 2009 02:20 PM
Automatically fill in field of a new record, based on related reco Tammy Microsoft Access Forms 6 5th Jun 2008 06:34 PM
Hide columns based on related cell Lisa Microsoft Excel Programming 4 30th May 2008 03:23 AM
Automatically create record in related table Jonathan Brown Microsoft Access Form Coding 3 5th Mar 2008 01:07 AM
Re: automatically create a record in a non-related subform #2 Steve Schapel Microsoft Access 1 4th Jan 2007 11:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:08 AM.