CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeChargeStudio.Discussion

 Add/Edit Forms

Print topic Send  topic

Author Message
Brian
Posted: 07/02/2003, 6:19 PM

I have a form that I calculate a record ID after the user presses ADD. The
field I populate is hidden.

How can I have that same field visible when the user EDITS the record? I'm
not going to change the value - just display it?


DonB
Posted: 07/02/2003, 6:43 PM

Put a Label control on the page, call it lblEdit.

Change its datasource to Code Expression

Select lblEdit and create the BeforeShow event, specifying Add Code

In the event put this code

If EditMode Then
lblEdit.Value = Hidden1.Value
End If

Or if the language you use is not ASP, follow the syntax for it - the same
idea works for all.

You can't really distinguish Edit from Insert this way, so if not exactly
what you need, you can put a Link Parameter on the Edit and Insert Links of
your form. Put in parameters of type "Expression" such as value = 1 and
Name = "Mode" and value=2 and Name = "Mode" so each link passes a parameter
that lets you tell if Edit or Insert mode has been selected., then you can
change the "If" to test the value of the function
CCgetparam("mode","") to see if it is 1 or 2 and give the label a value when
it is 1. For the other two cased, the label will remain blank and not
appear on screen.


DonB


"Brian" <bmaclenn@nospam.com> wrote in message
news:be00ad$krn$1@news.codecharge.com...
> I have a form that I calculate a record ID after the user presses ADD. The
> field I populate is hidden.
>
> How can I have that same field visible when the user EDITS the record? I'm
> not going to change the value - just display it?
>
>
>

Brian
Posted: 07/02/2003, 6:53 PM

Excellent!

Thanks DonB.

The other way of course is to just make a seperate edit and add form. :)

Thanks again.


"DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
news:be01no$mg6$1@news.codecharge.com...
> Put a Label control on the page, call it lblEdit.
>
> Change its datasource to Code Expression
>
> Select lblEdit and create the BeforeShow event, specifying Add Code
>
> In the event put this code
>
> If EditMode Then
> lblEdit.Value = Hidden1.Value
> End If
>
> Or if the language you use is not ASP, follow the syntax for it - the
same
> idea works for all.
>
> You can't really distinguish Edit from Insert this way, so if not exactly
> what you need, you can put a Link Parameter on the Edit and Insert Links
of
> your form. Put in parameters of type "Expression" such as value = 1 and
> Name = "Mode" and value=2 and Name = "Mode" so each link passes a
parameter
> that lets you tell if Edit or Insert mode has been selected., then you can
> change the "If" to test the value of the function
> CCgetparam("mode","") to see if it is 1 or 2 and give the label a value
when
> it is 1. For the other two cased, the label will remain blank and not
> appear on screen.
>
>
> DonB
>
>
> "Brian" <bmaclenn@nospam.com> wrote in message
>news:be00ad$krn$1@news.codecharge.com...
> > I have a form that I calculate a record ID after the user presses ADD.
The
> > field I populate is hidden.
> >
> > How can I have that same field visible when the user EDITS the record?
I'm
> > not going to change the value - just display it?
> >
> >
> >
>
>

DonB
Posted: 07/02/2003, 8:08 PM

Oh man, put a big smiley face on that one! Unless you get paid by the form.

It would be handy to have a edit/insert property for controls where this
flip-flop could be done automatically. I find it's something that comes up
all the time. Especially for dropdown lists - a readonly label vs an edit
dropdown would be very cool.

DonB


"Brian" <bmaclenn@nospam.com> wrote in message
news:be02bn$n66$1@news.codecharge.com...
> Excellent!
>
> Thanks DonB.
>
> The other way of course is to just make a seperate edit and add form. :)
>
> Thanks again.
>
>
> "DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
>news:be01no$mg6$1@news.codecharge.com...
> > Put a Label control on the page, call it lblEdit.
> >
> > Change its datasource to Code Expression
> >
> > Select lblEdit and create the BeforeShow event, specifying Add Code
> >
> > In the event put this code
> >
> > If EditMode Then
> > lblEdit.Value = Hidden1.Value
> > End If
> >
> > Or if the language you use is not ASP, follow the syntax for it - the
> same
> > idea works for all.
> >
> > You can't really distinguish Edit from Insert this way, so if not
exactly
> > what you need, you can put a Link Parameter on the Edit and Insert Links
> of
> > your form. Put in parameters of type "Expression" such as value = 1 and
> > Name = "Mode" and value=2 and Name = "Mode" so each link passes a
> parameter
> > that lets you tell if Edit or Insert mode has been selected., then you
can
> > change the "If" to test the value of the function
> > CCgetparam("mode","") to see if it is 1 or 2 and give the label a value
> when
> > it is 1. For the other two cased, the label will remain blank and not
> > appear on screen.
> >
> >
> > DonB
> >
> >
> > "Brian" <bmaclenn@nospam.com> wrote in message
> >news:be00ad$krn$1@news.codecharge.com...
> > > I have a form that I calculate a record ID after the user presses ADD.
> The
> > > field I populate is hidden.
> > >
> > > How can I have that same field visible when the user EDITS the record?
> I'm
> > > not going to change the value - just display it?
> > >
> > >
> > >
> >
> >
>
>

NetFocus.biz
Posted: 07/03/2003, 1:08 AM

How about using the EditMode property - if form.EditMode then
control.visible=true

This way one form fits all, and Brian's client saves the cost of 1 form. ;)

Alistair



"DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
news:be06nh$si4$1@news.codecharge.com...
> Oh man, put a big smiley face on that one! Unless you get paid by the
form.
>
> It would be handy to have a edit/insert property for controls where this
> flip-flop could be done automatically. I find it's something that comes
up
> all the time. Especially for dropdown lists - a readonly label vs an
edit
> dropdown would be very cool.
>
> DonB
>
>
> "Brian" <bmaclenn@nospam.com> wrote in message
>news:be02bn$n66$1@news.codecharge.com...
> > Excellent!
> >
> > Thanks DonB.
> >
> > The other way of course is to just make a seperate edit and add form. :)
> >
> > Thanks again.
> >
> >
> > "DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
> >news:be01no$mg6$1@news.codecharge.com...
> > > Put a Label control on the page, call it lblEdit.
> > >
> > > Change its datasource to Code Expression
> > >
> > > Select lblEdit and create the BeforeShow event, specifying Add Code
> > >
> > > In the event put this code
> > >
> > > If EditMode Then
> > > lblEdit.Value = Hidden1.Value
> > > End If
> > >
> > > Or if the language you use is not ASP, follow the syntax for it - the
> > same
> > > idea works for all.
> > >
> > > You can't really distinguish Edit from Insert this way, so if not
> exactly
> > > what you need, you can put a Link Parameter on the Edit and Insert
Links
> > of
> > > your form. Put in parameters of type "Expression" such as value = 1
and
> > > Name = "Mode" and value=2 and Name = "Mode" so each link passes a
> > parameter
> > > that lets you tell if Edit or Insert mode has been selected., then you
> can
> > > change the "If" to test the value of the function
> > > CCgetparam("mode","") to see if it is 1 or 2 and give the label a
value
> > when
> > > it is 1. For the other two cased, the label will remain blank and not
> > > appear on screen.
> > >
> > >
> > > DonB
> > >
> > >
> > > "Brian" <bmaclenn@nospam.com> wrote in message
> > >news:be00ad$krn$1@news.codecharge.com...
> > > > I have a form that I calculate a record ID after the user presses
ADD.
> > The
> > > > field I populate is hidden.
> > > >
> > > > How can I have that same field visible when the user EDITS the
record?
> > I'm
> > > > not going to change the value - just display it?
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.488 / Virus Database: 287 - Release Date: 05/06/2003

DonB
Posted: 07/03/2003, 5:54 AM

EditMode will note tell you whether you are preparing for an INSERT or for
an UPDATE. If you want different appearance for each of theses two types of
edits, you need more information than what you can get from EditMode.

DonB


"NetFocus.biz" <amcfayen@netfocus.biz> wrote in message
news:be0o9d$in7$1@news.codecharge.com...
> How about using the EditMode property - if form.EditMode then
> control.visible=true
>
> This way one form fits all, and Brian's client saves the cost of 1 form.
;)
>
> Alistair
>
>
>
> "DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
>news:be06nh$si4$1@news.codecharge.com...
> > Oh man, put a big smiley face on that one! Unless you get paid by the
> form.
> >
> > It would be handy to have a edit/insert property for controls where this
> > flip-flop could be done automatically. I find it's something that comes
> up
> > all the time. Especially for dropdown lists - a readonly label vs an
> edit
> > dropdown would be very cool.
> >
> > DonB
> >
> >
> > "Brian" <bmaclenn@nospam.com> wrote in message
> >news:be02bn$n66$1@news.codecharge.com...
> > > Excellent!
> > >
> > > Thanks DonB.
> > >
> > > The other way of course is to just make a seperate edit and add form.
:)
> > >
> > > Thanks again.
> > >
> > >
> > > "DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
> > >news:be01no$mg6$1@news.codecharge.com...
> > > > Put a Label control on the page, call it lblEdit.
> > > >
> > > > Change its datasource to Code Expression
> > > >
> > > > Select lblEdit and create the BeforeShow event, specifying Add Code
> > > >
> > > > In the event put this code
> > > >
> > > > If EditMode Then
> > > > lblEdit.Value = Hidden1.Value
> > > > End If
> > > >
> > > > Or if the language you use is not ASP, follow the syntax for it -
the
> > > same
> > > > idea works for all.
> > > >
> > > > You can't really distinguish Edit from Insert this way, so if not
> > exactly
> > > > what you need, you can put a Link Parameter on the Edit and Insert
> Links
> > > of
> > > > your form. Put in parameters of type "Expression" such as value = 1
> and
> > > > Name = "Mode" and value=2 and Name = "Mode" so each link passes a
> > > parameter
> > > > that lets you tell if Edit or Insert mode has been selected., then
you
> > can
> > > > change the "If" to test the value of the function
> > > > CCgetparam("mode","") to see if it is 1 or 2 and give the label a
> value
> > > when
> > > > it is 1. For the other two cased, the label will remain blank and
not
> > > > appear on screen.
> > > >
> > > >
> > > > DonB
> > > >
> > > >
> > > > "Brian" <bmaclenn@nospam.com> wrote in message
> > > >news:be00ad$krn$1@news.codecharge.com...
> > > > > I have a form that I calculate a record ID after the user presses
> ADD.
> > > The
> > > > > field I populate is hidden.
> > > > >
> > > > > How can I have that same field visible when the user EDITS the
> record?
> > > I'm
> > > > > not going to change the value - just display it?
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.488 / Virus Database: 287 - Release Date: 05/06/2003
>
>

NetFocus.biz
Posted: 07/03/2003, 6:01 AM

Isn't the whole point of editmode to determine whether you're in Insert or
Edit mode? I've used it to display / hide objects like checkboxes or when
I'm editing a current record.

From the CCS Help file:

Description
This property determines whether given record form is currently in edit or
insert mode. In edit mode all data source parameters need to have values
assigned (including row identifier). In insert mode some data items may be
empty.

Alistair


"DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
news:be1922$76u$1@news.codecharge.com...
> EditMode will note tell you whether you are preparing for an INSERT or for
> an UPDATE. If you want different appearance for each of theses two types
of
> edits, you need more information than what you can get from EditMode.
>
> DonB
>
>
> "NetFocus.biz" <amcfayen@netfocus.biz> wrote in message
>news:be0o9d$in7$1@news.codecharge.com...
> > How about using the EditMode property - if form.EditMode then
> > control.visible=true
> >
> > This way one form fits all, and Brian's client saves the cost of 1 form.
> ;)
> >
> > Alistair
> >
> >
> >
> > "DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
> >news:be06nh$si4$1@news.codecharge.com...
> > > Oh man, put a big smiley face on that one! Unless you get paid by the
> > form.
> > >
> > > It would be handy to have a edit/insert property for controls where
this
> > > flip-flop could be done automatically. I find it's something that
comes
> > up
> > > all the time. Especially for dropdown lists - a readonly label vs an
> > edit
> > > dropdown would be very cool.
> > >
> > > DonB
> > >
> > >
> > > "Brian" <bmaclenn@nospam.com> wrote in message
> > >news:be02bn$n66$1@news.codecharge.com...
> > > > Excellent!
> > > >
> > > > Thanks DonB.
> > > >
> > > > The other way of course is to just make a seperate edit and add
form.
> :)
> > > >
> > > > Thanks again.
> > > >
> > > >
> > > > "DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
> > > >news:be01no$mg6$1@news.codecharge.com...
> > > > > Put a Label control on the page, call it lblEdit.
> > > > >
> > > > > Change its datasource to Code Expression
> > > > >
> > > > > Select lblEdit and create the BeforeShow event, specifying Add
Code
> > > > >
> > > > > In the event put this code
> > > > >
> > > > > If EditMode Then
> > > > > lblEdit.Value = Hidden1.Value
> > > > > End If
> > > > >
> > > > > Or if the language you use is not ASP, follow the syntax for it -
> the
> > > > same
> > > > > idea works for all.
> > > > >
> > > > > You can't really distinguish Edit from Insert this way, so if not
> > > exactly
> > > > > what you need, you can put a Link Parameter on the Edit and Insert
> > Links
> > > > of
> > > > > your form. Put in parameters of type "Expression" such as value =
1
> > and
> > > > > Name = "Mode" and value=2 and Name = "Mode" so each link passes a
> > > > parameter
> > > > > that lets you tell if Edit or Insert mode has been selected., then
> you
> > > can
> > > > > change the "If" to test the value of the function
> > > > > CCgetparam("mode","") to see if it is 1 or 2 and give the label a
> > value
> > > > when
> > > > > it is 1. For the other two cased, the label will remain blank and
> not
> > > > > appear on screen.
> > > > >
> > > > >
> > > > > DonB
> > > > >
> > > > >
> > > > > "Brian" <bmaclenn@nospam.com> wrote in message
> > > > >news:be00ad$krn$1@news.codecharge.com...
> > > > > > I have a form that I calculate a record ID after the user
presses
> > ADD.
> > > > The
> > > > > > field I populate is hidden.
> > > > > >
> > > > > > How can I have that same field visible when the user EDITS the
> > record?
> > > > I'm
> > > > > > not going to change the value - just display it?
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.488 / Virus Database: 287 - Release Date: 05/06/2003
> >
> >
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.488 / Virus Database: 287 - Release Date: 05/06/2003

DonB
Posted: 07/03/2003, 8:17 AM

Yes, correct, as long as you want the form to only take on one of those two
states. I usually have to deal with a third, "neither edit nor insert".
With a grid and record on one page, I prefer to hide the record grid until
an edit or insert is explictly requested - so there is less clutter on the
screen.

This is where I found EditMode inadequate. If not editing, the record form
assumes "insert" (EditMode false). So it is not possible to tell when an
insert starts without passing another parameter to signify the "add new"
link was clicked.

Using only EditMode, I could not show the record form for the "insert" case.

My bad. This has become so automatic, I did not address Brian's issue
correctly - but you did, NetFocus.

DonB


"NetFocus.biz" <amcfayen@netfocus.biz> wrote in message
news:be19g4$7qu$1@news.codecharge.com...
> Isn't the whole point of editmode to determine whether you're in Insert or
> Edit mode? I've used it to display / hide objects like checkboxes or when
> I'm editing a current record.
>
> From the CCS Help file:
>
> Description
> This property determines whether given record form is currently in edit or
> insert mode. In edit mode all data source parameters need to have values
> assigned (including row identifier). In insert mode some data items may be
> empty.
>
> Alistair
>
>
> "DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
>news:be1922$76u$1@news.codecharge.com...
> > EditMode will note tell you whether you are preparing for an INSERT or
for
> > an UPDATE. If you want different appearance for each of theses two
types
> of
> > edits, you need more information than what you can get from EditMode.
> >
> > DonB
> >
> >
> > "NetFocus.biz" <amcfayen@netfocus.biz> wrote in message
> >news:be0o9d$in7$1@news.codecharge.com...
> > > How about using the EditMode property - if form.EditMode then
> > > control.visible=true
> > >
> > > This way one form fits all, and Brian's client saves the cost of 1
form.
> > ;)
> > >
> > > Alistair
> > >
> > >
> > >
> > > "DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
> > >news:be06nh$si4$1@news.codecharge.com...
> > > > Oh man, put a big smiley face on that one! Unless you get paid by
the
> > > form.
> > > >
> > > > It would be handy to have a edit/insert property for controls where
> this
> > > > flip-flop could be done automatically. I find it's something that
> comes
> > > up
> > > > all the time. Especially for dropdown lists - a readonly label vs
an
> > > edit
> > > > dropdown would be very cool.
> > > >
> > > > DonB
> > > >
> > > >
> > > > "Brian" <bmaclenn@nospam.com> wrote in message
> > > >news:be02bn$n66$1@news.codecharge.com...
> > > > > Excellent!
> > > > >
> > > > > Thanks DonB.
> > > > >
> > > > > The other way of course is to just make a seperate edit and add
> form.
> > :)
> > > > >
> > > > > Thanks again.
> > > > >
> > > > >
> > > > > "DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
> > > > >news:be01no$mg6$1@news.codecharge.com...
> > > > > > Put a Label control on the page, call it lblEdit.
> > > > > >
> > > > > > Change its datasource to Code Expression
> > > > > >
> > > > > > Select lblEdit and create the BeforeShow event, specifying Add
> Code
> > > > > >
> > > > > > In the event put this code
> > > > > >
> > > > > > If EditMode Then
> > > > > > lblEdit.Value = Hidden1.Value
> > > > > > End If
> > > > > >
> > > > > > Or if the language you use is not ASP, follow the syntax for
t -
> > the
> > > > > same
> > > > > > idea works for all.
> > > > > >
> > > > > > You can't really distinguish Edit from Insert this way, so if
not
> > > > exactly
> > > > > > what you need, you can put a Link Parameter on the Edit and
Insert
> > > Links
> > > > > of
> > > > > > your form. Put in parameters of type "Expression" such as value
=
> 1
> > > and
> > > > > > Name = "Mode" and value=2 and Name = "Mode" so each link passes
a
> > > > > parameter
> > > > > > that lets you tell if Edit or Insert mode has been selected.,
then
> > you
> > > > can
> > > > > > change the "If" to test the value of the function
> > > > > > CCgetparam("mode","") to see if it is 1 or 2 and give the label
a
> > > value
> > > > > when
> > > > > > it is 1. For the other two cased, the label will remain blank
and
> > not
> > > > > > appear on screen.
> > > > > >
> > > > > >
> > > > > > DonB
> > > > > >
> > > > > >
> > > > > > "Brian" <bmaclenn@nospam.com> wrote in message
> > > > > >news:be00ad$krn$1@news.codecharge.com...
> > > > > > > I have a form that I calculate a record ID after the user
> presses
> > > ADD.
> > > > > The
> > > > > > > field I populate is hidden.
> > > > > > >
> > > > > > > How can I have that same field visible when the user EDITS the
> > > record?
> > > > > I'm
> > > > > > > not going to change the value - just display it?
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > > ---
> > > Outgoing mail is certified Virus Free.
> > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > Version: 6.0.488 / Virus Database: 287 - Release Date: 05/06/2003
> > >
> > >
> >
> >
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.488 / Virus Database: 287 - Release Date: 05/06/2003
>
>

NetFocus.biz
Posted: 07/04/2003, 12:55 AM

Hi Don

Thanks for that; I think we normally see solutions in terms of the way we
use the tools or present options to clients; I don't think there's any harm
at all in seeing two or three different approaches to the same problem, and
given Yes's woeful lack of input to this group, this is the only way any of
us is going to pick up new tips.

Regards

Alistair


"DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
news:be1hdu$hs1$1@news.codecharge.com...
> Yes, correct, as long as you want the form to only take on one of those
two
> states. I usually have to deal with a third, "neither edit nor insert".
> With a grid and record on one page, I prefer to hide the record grid until
> an edit or insert is explictly requested - so there is less clutter on the
> screen.
>
> This is where I found EditMode inadequate. If not editing, the record
form
> assumes "insert" (EditMode false). So it is not possible to tell when an
> insert starts without passing another parameter to signify the "add new"
> link was clicked.
>
> Using only EditMode, I could not show the record form for the "insert"
case.
>
> My bad. This has become so automatic, I did not address Brian's issue
> correctly - but you did, NetFocus.
>
> DonB
>
>
> "NetFocus.biz" <amcfayen@netfocus.biz> wrote in message
>news:be19g4$7qu$1@news.codecharge.com...
> > Isn't the whole point of editmode to determine whether you're in Insert
or
> > Edit mode? I've used it to display / hide objects like checkboxes or
when
> > I'm editing a current record.
> >
> > From the CCS Help file:
> >
> > Description
> > This property determines whether given record form is currently in edit
or
> > insert mode. In edit mode all data source parameters need to have values
> > assigned (including row identifier). In insert mode some data items may
be
> > empty.
> >
> > Alistair
> >
> >
> > "DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
> >news:be1922$76u$1@news.codecharge.com...
> > > EditMode will note tell you whether you are preparing for an INSERT or
> for
> > > an UPDATE. If you want different appearance for each of theses two
> types
> > of
> > > edits, you need more information than what you can get from EditMode.
> > >
> > > DonB
> > >
> > >
> > > "NetFocus.biz" <amcfayen@netfocus.biz> wrote in message
> > >news:be0o9d$in7$1@news.codecharge.com...
> > > > How about using the EditMode property - if form.EditMode then
> > > > control.visible=true
> > > >
> > > > This way one form fits all, and Brian's client saves the cost of 1
> form.
> > > ;)
> > > >
> > > > Alistair
> > > >
> > > >
> > > >
> > > > "DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
> > > >news:be06nh$si4$1@news.codecharge.com...
> > > > > Oh man, put a big smiley face on that one! Unless you get paid by
> the
> > > > form.
> > > > >
> > > > > It would be handy to have a edit/insert property for controls
where
> > this
> > > > > flip-flop could be done automatically. I find it's something that
> > comes
> > > > up
> > > > > all the time. Especially for dropdown lists - a readonly label
vs
> an
> > > > edit
> > > > > dropdown would be very cool.
> > > > >
> > > > > DonB
> > > > >
> > > > >
> > > > > "Brian" <bmaclenn@nospam.com> wrote in message
> > > > >news:be02bn$n66$1@news.codecharge.com...
> > > > > > Excellent!
> > > > > >
> > > > > > Thanks DonB.
> > > > > >
> > > > > > The other way of course is to just make a seperate edit and add
> > form.
> > > :)
> > > > > >
> > > > > > Thanks again.
> > > > > >
> > > > > >
> > > > > > "DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in
message
> > > > > >news:be01no$mg6$1@news.codecharge.com...
> > > > > > > Put a Label control on the page, call it lblEdit.
> > > > > > >
> > > > > > > Change its datasource to Code Expression
> > > > > > >
> > > > > > > Select lblEdit and create the BeforeShow event, specifying Add
> > Code
> > > > > > >
> > > > > > > In the event put this code
> > > > > > >
> > > > > > > If EditMode Then
> > > > > > > lblEdit.Value = Hidden1.Value
> > > > > > > End If
> > > > > > >
> > > > > > > Or if the language you use is not ASP, follow the syntax for
> t -
> > > the
> > > > > > same
> > > > > > > idea works for all.
> > > > > > >
> > > > > > > You can't really distinguish Edit from Insert this way, so if
> not
> > > > > exactly
> > > > > > > what you need, you can put a Link Parameter on the Edit and
> Insert
> > > > Links
> > > > > > of
> > > > > > > your form. Put in parameters of type "Expression" such as
value
> =
> > 1
> > > > and
> > > > > > > Name = "Mode" and value=2 and Name = "Mode" so each link
passes
> a
> > > > > > parameter
> > > > > > > that lets you tell if Edit or Insert mode has been selected.,
> then
> > > you
> > > > > can
> > > > > > > change the "If" to test the value of the function
> > > > > > > CCgetparam("mode","") to see if it is 1 or 2 and give the
label
> a
> > > > value
> > > > > > when
> > > > > > > it is 1. For the other two cased, the label will remain blank
> and
> > > not
> > > > > > > appear on screen.
> > > > > > >
> > > > > > >
> > > > > > > DonB
> > > > > > >
> > > > > > >
> > > > > > > "Brian" <bmaclenn@nospam.com> wrote in message
> > > > > > >news:be00ad$krn$1@news.codecharge.com...
> > > > > > > > I have a form that I calculate a record ID after the user
> > presses
> > > > ADD.
> > > > > > The
> > > > > > > > field I populate is hidden.
> > > > > > > >
> > > > > > > > How can I have that same field visible when the user EDITS
the
> > > > record?
> > > > > > I'm
> > > > > > > > not going to change the value - just display it?
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > ---
> > > > Outgoing mail is certified Virus Free.
> > > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > > Version: 6.0.488 / Virus Database: 287 - Release Date: 05/06/2003
> > > >
> > > >
> > >
> > >
> >
> >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.488 / Virus Database: 287 - Release Date: 05/06/2003
> >
> >
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.488 / Virus Database: 287 - Release Date: 05/06/2003

Sjg
Posted: 07/12/2003, 1:19 AM

Make it a label. If it's not populated until the insert, it won't display.
When the field has a value, it will display.

You want it to be a label when it is displayed after the insert anyway.

Example.

On my user table, I have a Login Date that is updated to the current
date/time when a user logs in. I display the field as a label. After
adding a new user, nothing is displayed because nothing is in the field.
After the new user logs in for the first time, the data is displayed in the
field.

Amount of coding done ****** NONE ******.

Amount of Maintenance required ******* NONE ******.

Make things easy on yourself. Design for ease of implementatin and
maintenance.

Sure, there were some methods to go through and do a bunch of codding, but
why? If you can design it so you don't have to do any coding in the events,
then it will be that much simpler to maintain.

I have been developing for over 20 years and the worst programmers are the
ones that put in excessive code to do some simple little thing that can be
done very easily. It is simply creating more code that needs to be
maintained.









"Brian" <bmaclenn@nospam.com> wrote in message
news:be00ad$krn$1@news.codecharge.com...
> I have a form that I calculate a record ID after the user presses ADD. The
> field I populate is hidden.
>
> How can I have that same field visible when the user EDITS the record? I'm
> not going to change the value - just display it?
>
>
>

Brian
Posted: 08/11/2003, 7:04 PM

Thanks all for the help!

I went with multiple forms. :)
So the Insert Form is blank, Edit Form has the ID field on it. It works -
not the best way of doing it and the client was happy with the result! So I
call it a success!

Thanks again for all the help.


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.