Groups > dBase > Getting Started with dBase > Re: saveorupdate




saveorupdate

saveorupdate
Wed, 26 Mar 2008 10:57:41 -050
pushbutton, form.save()  ok
when you exit a form,  form.close() and then open the same form, does it do
form.save(),  form.updatecontrols(), or  ???.
Post Reply
Re: saveorupdate
Wed, 26 Mar 2008 11:01:20 -070
"charles" <guitarbluescharlie@yahoo.com> wrote in message 
news:7OvTfo1jIHA.960@news-server...
> pushbutton, form.save()  ok
> when you exit a form,  form.close() and then open the same form, does it 
> do form.save(),  form.updatecontrols(), or  ???.

Not sure if I understand your question but I can confirm to you that 
form.close() does not save a form and it is not mean to.

There are a couple ways to handle saving a form on close()

1)  Issue a form.save() in the form_onclose event

2) In the CanClose event check the rowset state to see if any changes were 
made and if so then prompt the user with the question msgbox("Save 
Changes?","Changes were made",35).  Then take the action the user
wants.

Greg Hill 

Post Reply
Re: saveorupdate
Fri, 28 Mar 2008 15:23:20 -050
Greg Hill Wrote:

> "charles" <guitarbluescharlie@yahoo.com> wrote in message 
> news:7OvTfo1jIHA.960@news-server...
> > pushbutton, form.save()  ok
> > when you exit a form,  form.close() and then open the same form, does
it 
> > do form.save(),  form.updatecontrols(), or  ???.
> 
> Not sure if I understand your question but I can confirm to you that 
> form.close() does not save a form and it is not mean to.
> 
> There are a couple ways to handle saving a form on close()
> 
> 1)  Issue a form.save() in the form_onclose event
> 
> 2) In the CanClose event check the rowset state to see if any changes were

> made and if so then prompt the user with the question msgbox("Save 
> Changes?","Changes were made",35).  Then take the action the
user wants.
> 
> Greg Hill 
> 
> 
hi greg :
thanks for the info.  what i have been trying to accomplish is,  input to an
entryfield, a combobox under that, so i could select from the combobox list. i
guess i was trying to have, was an entryfield, combobox, listbox combination all
in one. maybe thats a good one for the wish list. so, if i use an entryfield and
a listbox, how would make it so the listbox doesn't show all the time ?  please
take into consideration ( in a way ) that i'm vary new to programming and i'm
just learning on my own.
Post Reply
Re: saveorupdate
Fri, 28 Mar 2008 15:42:09 -070
"charles" <guitarbluescharlie@yahoo.com> wrote in message 
news:OcYoQGRkIHA.468@news-server...
> Greg Hill Wrote:
>
>> "charles" <guitarbluescharlie@yahoo.com> wrote in
message
>> news:7OvTfo1jIHA.960@news-server...
>> > pushbutton, form.save()  ok
>> > when you exit a form,  form.close() and then open the same form,
does 
>> > it
>> > do form.save(),  form.updatecontrols(), or  ???.
>>
>> Not sure if I understand your question but I can confirm to you that
>> form.close() does not save a form and it is not mean to.
>>
>> There are a couple ways to handle saving a form on close()
>>
>> 1)  Issue a form.save() in the form_onclose event
>>
>> 2) In the CanClose event check the rowset state to see if any changes 
>> were
>> made and if so then prompt the user with the question
msgbox("Save
>> Changes?","Changes were made",35).  Then take the action
the user wants.
>>
>> Greg Hill
>>
>>
> hi greg :
> thanks for the info.  what i have been trying to accomplish is,  input to 
> an entryfield, a combobox under that, so i could select from the combobox 
> list. i guess i was trying to have, was an entryfield, combobox, listbox 
> combination all in one. maybe thats a good one for the wish list. so, if i

> use an entryfield and a listbox, how would make it so the listbox doesn't 
> show all the time ?  please take into consideration ( in a way ) that i'm 
> vary new to programming and i'm just learning on my own.
> thanks - charlie k

One way is to change the visibility property of the listbox as follows:
form.listbox1.visible = false
then you might also want to disable it at the same time as follows:
form.listbox1.visible = false
form.listbox1.enabled = false

Make it visible again as follows:
form.listbox1.visible = true
form.listbox1.enabled = true

You can also change the height of it as follows:
form.listbox1.height = 5

Be sure to look at the properties available for each object and know that 
you can change them dynamically.  OOP makes this stuff a breeze<g>

One problem with the list box is that "unless it has focus", you won't
be 
able to do a incremental search i.e.  you type a letter and the cursor goes 
to it the more you type the closer you get the row you want.
You might consider a gird with a seeker combination.  It allows you to have 
a list of rows and much more.

Greg Hill

Post Reply
Re: saveorupdate
Mon, 31 Mar 2008 10:35:35 -050
Greg Hill Wrote:

> "charles" <guitarbluescharlie@yahoo.com> wrote in message 
> news:OcYoQGRkIHA.468@news-server...
> > Greg Hill Wrote:
> >
> >> "charles" <guitarbluescharlie@yahoo.com> wrote in
message
> >> news:7OvTfo1jIHA.960@news-server...
> >> > pushbutton, form.save()  ok
> >> > when you exit a form,  form.close() and then open the same
form, does 
> >> > it
> >> > do form.save(),  form.updatecontrols(), or  ???.
> >>
> >> Not sure if I understand your question but I can confirm to you
that
> >> form.close() does not save a form and it is not mean to.
> >>
> >> There are a couple ways to handle saving a form on close()
> >>
> >> 1)  Issue a form.save() in the form_onclose event
> >>
> >> 2) In the CanClose event check the rowset state to see if any
changes 
> >> were
> >> made and if so then prompt the user with the question
msgbox("Save
> >> Changes?","Changes were made",35).  Then take the
action the user wants.
> >>
> >> Greg Hill
> >>
> >>
> > hi greg :
> > thanks for the info.  what i have been trying to accomplish is,  input
to 
> > an entryfield, a combobox under that, so i could select from the
combobox 
> > list. i guess i was trying to have, was an entryfield, combobox,
listbox 
> > combination all in one. maybe thats a good one for the wish list. so,
if i 
> > use an entryfield and a listbox, how would make it so the listbox
doesn't 
> > show all the time ?  please take into consideration ( in a way ) that
i'm 
> > vary new to programming and i'm just learning on my own.
> > thanks - charlie k
> 
> One way is to change the visibility property of the listbox as follows:
> form.listbox1.visible = false
> then you might also want to disable it at the same time as follows:
> form.listbox1.visible = false
> form.listbox1.enabled = false
> 
> Make it visible again as follows:
> form.listbox1.visible = true
> form.listbox1.enabled = true
> 
> You can also change the height of it as follows:
> form.listbox1.height = 5
> 
> Be sure to look at the properties available for each object and know that 
> you can change them dynamically.  OOP makes this stuff a breeze<g>
> 
> One problem with the list box is that "unless it has focus", you
won't be 
> able to do a incremental search i.e.  you type a letter and the cursor goes

> to it the more you type the closer you get the row you want.
> You might consider a gird with a seeker combination.  It allows you to have

> a list of rows and much more.
> 
> Greg Hill
> 
> 
greg :
         ok, i see how that works. so i think i will use an entryfield,  a
pushbutton on click to make the listbox appear or visible =
"true".   now i would like to onclick  the push button ( a second time
) to either return it false or close the box. so one click on, one click off,
same pushbutton.
Post Reply
<< Previous 1 2 3 Next >>
( Page 1 of 3 )
about | contact