Hi Bernie, Thanks for the quick response. I have two follow-up questions.
vDetailNo was added into the component ID field in the scrolling region properties. Your code below was pasted into the custom EEP on the Bit Button only adding "Return" When I execute the bit button, I get the message, "No rows exist or satisfy the specified clause. (2059) Something tells me either I am taking your guidance too literally or something very minor is missing.
What is your suggestion for hiding the RowID field in the scrolling region. I used DB Edit with read only because the background can be controlled. In my scrolling regions I like to change the background color for the active region line. Can't figure out how to do the same for the text.
Thanks again for your assistance.
Ed
Aug 2, 2009 07:44:08 PM, [email protected] wrote:
Hi Ed,
See Below
----- Original Message -----
Sent: Sunday, August 02, 2009 6:32
PM
Subject: [RBASE-L] - RE: Change Date/Time
Picker to last keyed entry
Thanks Mike, Bernie, and Victor, I worked with the various suggestions
and my limited programming skills and requirements and am down to the
following....
I've created a simple form that updates two date fields
in a separate table called Procdate. One field is Bankdate and the other is
Postdate. These are the two repetitive dates in my Rent form. I execute the
form from a Bit button at the top of the form (above the scrolling region)
and it works fine.
I added RowID to the Rent table with autonumber. The
RowID is in the scrolling region.
Rather than get fancy with date
picker...my original idea, I decided to keep this a bit simpler which is
also more flexible and use Bit buttons to fill in the Bankdate and Postdate
as desired by the user. This way the user can also key in the date or use
DatePicker as desired.
Do I need to have the RowID in the scrolling
region? Yes
Set the component ID vDetailNo
in the scrolling region then,
getproperty vDetailNo textvalue
'tDetailNo' set var iDetailNo int = (int(.tDetailNo)) update rentroll
set bankdate = .bankp where rowid = .iDetailNo
Second, I cannot get the Bit Button in
the scrolling region to work. Here's the custom EEP behind it for the
Bankdate scenario. I am defining the variable bankp as a variable in the
form with a lookup to the procdate table; i.e. bankp = bankdate in
procdate Here's the custom eep code set var vrowid =
rowid in rentroll update rentroll set bankdate = .bankp where rowid =
.vrowid recalc var return The custom eep code works fine from the
R> prompt so I am guessing that I am missing something pretty
obvious. Thanks as always for the assistance and
advice. Ed Jul 29, 2009 06:53:57 PM, [email protected]
wrote:
A looonnnng time
ago I wrote a calendar for RBase Dos 4.5, then I wrote another for
Windows 5.0 and updated it a couple times thru 6.5. I wrote a fresh one
for 7.1 that I still use. It is an RBase form that will accept a 'SEED'
date (to display whatever beginning date you want. When used in a
scrolling region, it will update the field in the region by its'
component ID. The calendar with a demo RMD file can be downloaded from
my site: http://www.byerley.net/Rb7Calendar.zip
This is an
example from my accounts payable form:
{Note: In a scrolling region,
the component that is ID'd is updated in the row that has
focus}
SET VAR vtext = + ('Pick Received Date,vRetDate,' &
(CTXT(.#DATE))) EDIT USING rbcalendar CAPTION .vtext RECALC
VARIABLES
PROPERTY dberecdate textvalue .vretdate CLEAR VAR
vtext RETURN
----- Original Message ----- From: "Ed
Rivkin" <[email protected]> To: "RBASE-L Mailing List"
<[email protected]> Sent: Wednesday, July 29, 2009
7:01 PM Subject: [RBASE-L] - RE: Change Date/Time Picker to last keyed
entry
Victor, Thanks for setting me straight. Yes...I do the
same thing sometimes. Unfortunately I do not have a totally unique row
identifier in this situation.
I wonder if this could be done using
variables within the form which will address only the row that is being
updated in the region rather than the Update command.
I also have
a note into Jan asking if he can forward me what he used in the
past.
I'll slay this dragon one way or
another.
Ed
Jul 27, 2009 09:52:39 AM, [email protected] wrote:
I was assuming that you
have some kind of id for the row that you’re trying to update. It
could be CustomerID or EstimateID or what ever just something that
identifies the row that needs updating as unique. Sorry if I was not
clear, you know how sometime with you write something you know what you
talking about but know one else does. Happens to me all the time.
;-)
------------------------------------------------------------------------------
From:
[email protected] [mailto:[email protected]] On Behalf Of Ed Rivkin Sent: Sunday,
July 26, 2009 3:28 PM To: RBASE-L Mailing List Subject: [RBASE-L] -
RE: Change Date/Time Picker to last keyed entry
Victor, Thanks
for the suggestions. For some reason I am missing a most basic step,
i.e. setting the vRowID. When I try to define the variable in my form, I
keep getting an error because RowID isn't a variable or column in the
form. There must be something basic that I'm missing. Sorry for the
continued questioning about this but I searched the archives as well
as some sample apps and couldn't find anything that
addressed this.
BTW...Jan, if you also want to post your
solution for this, I am using Edit Using in both forms. In each case
I am trying to default two dates per row in a scrolling
region.
Thanks to you both for your
assistance.
Ed
Jul 24, 2009 09:53:45 AM, [email protected] wrote:
This is how I see it
working
“Before startup eepâ€
SET VAR vDate =
.#DATE
On your for have a form variable for the Rows ID
vRowID
= RowID
Have the Varible Date/Time picker in your scrolling Region
and using the onclick eep update the row.
UPDATE Table Set
DateField = .vDate WHERE RowID = .vRowID
You could also do something
like this with a second form with the variable Calendar control on
it.
First steps the same on the first form but instead
Create
a no table form with variable calendar control on it and no predefined
var in it. All that comes for the first form.
In your scrolling
region put a button in it (I don’t care which one) and a DB label next
to it and set it up on you datefield
EDIT USING
CalendarForm
UPDATE TableName Set DateField = .vDate WHERE RowID =
.vRowID
PROPERTY TABLE 'REFRESH'
It would work
something like this. Now that I have written this email I like the
second way
better.
------------------------------------------------------------------------------
From:
[email protected] [mailto:[email protected]] On Behalf Of Ed Rivkin Sent:
Thursday, July 23, 2009 8:31 PM To: RBASE-L Mailing List Subject:
[RBASE-L] - RE: Change Date/Time Picker to last keyed
entry
Victor, Thanks for the quick reply but I am a bit confused
about how to use update in this example. Are you suggesting I update
the variable by using the update command in an EEP executed when
leaving the variable field. The entry is occuring in a scrolling region
so I need to limit the update to the specific row in which the entry is
occuring.
Ed
Jul 23, 2009 04:14:16 PM, [email protected] wrote:
Use the variable date/time
picker. That and a update command should do the
trick.
------------------------------------------------------------------------------
From:
[email protected] [mailto:[email protected]] On Behalf Of Ed Rivkin Sent:
Thursday, July 23, 2009 10:55 AM To: RBASE-L Mailing List Subject:
[RBASE-L] - Change Date/Time Picker to last keyed entry
Hi
folks, The majority of the data entry into my rent application involves
entering two dates; postal date and bank date per line. I thought my
user would like the date/time picker for these fields but it always
defaults back to the system date.
This presents some extra effort
because many of the entries in a particular session have the same
postal and/or bank date.
I would like to have the date picker work as
follows: a) default to system date when the form is started for postal
and bank date. b) display the last entered date after the first date
is entered for each field.
Is there an easy way to change the
date picker to accomplish this. I am using R:Base 7.6
Thanks
in advance.
Ed
|