Solved

From panel caption to a table

Posted on 1998-05-14
2
329 Views
Last Modified: 2010-04-06
I need an example of a code that will take a panel caption
that displays a date      (panel caption is tied to a calendar)
and will replace a date in a table that has
 only one field

jjhj
0
Comment
Question by:jjhj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
kjteng earned 100 total points
ID: 1345750
1. write the following code for the onChange of the calendar1 component:

   panel1.caption:=  dateTimeToStr( calendar1.calendarDate);

2. write code to update the table. You may append it to the onChange event of the calendar1:

  table1.edit;
  table1.fields[0].asString:= panel1.caption;
(*
   or something similar to this eg
   table1.fields[0].asFloat:= strToDateTime( panel1.caption)

   WATCH OUT FOR YOUR DATE FORMAT
*)
  table1.post;

Hope the above helps

0
 

Author Comment

by:jjhj
ID: 1345751
soooo simple i can't believe it
thanks

jjhj
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month10 days, 7 hours left to enroll

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question