Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

From panel caption to a table

Posted on 1998-05-14
2
Medium Priority
?
336 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 400 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

688 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