Hi all,
First time posting to ProFox - hoping someone can help me as I've wound =
myself into a bit of a knot with this challenge.
I have an order table and I'm grabbing a subset (by SQL query) into a =
cursor that is readwrite. I use this cursor as the recordsource for a =
grid on my form. Purpose of the form is to give the user ability to =
update 1 field - they are assigning a truck driver to each order. The =
driver details are from a drivers table and I'm using the firstname =
field as the rowsource for a combobox within the grid.
User can choose what data to show in the grid by picking a date range =
from a date picker control. Doing this runs the query again and updates =
the grid - but every time this happens, I lose the combobox control in =
column2!
What am I missing?
TIA,
Tina
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
Sounds like you are resetting the grid Recordsource.
Before you do the query set the recordsource to " " on the grid, then do the
requery and then set it to the cursor you have queried.
If this isn't the reason then is the combobox source an SQL Select or
another type such as alias or fieldlist? Knowing will help to solve the
problem but personally I would make the source an SQL select statement into
a discreet cursor.
Dave Crozier
-----Original Message-----
From: profox-bounces@leafe.com [mailto:profox-bounces@leafe.com] On Behalf
Of Tina Currie
Sent: 20 August 2009 06:41
To: profox@leafe.com
Subject: Quirks of using controls within a grid
Hi all,
First time posting to ProFox - hoping someone can help me as I've wound
myself into a bit of a knot with this challenge.
I have an order table and I'm grabbing a subset (by SQL query) into a cursor
that is readwrite. I use this cursor as the recordsource for a grid on my
form. Purpose of the form is to give the user ability to update 1 field -
they are assigning a truck driver to each order. The driver details are
from a drivers table and I'm using the firstname field as the rowsource for
a combobox within the grid.
User can choose what data to show in the grid by picking a date range from a
date picker control. Doing this runs the query again and updates the grid -
but every time this happens, I lose the combobox control in column2!
What am I missing?
TIA,
Tina
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
[excessive quoting removed by server]
I like to create the grid cursor in the form LOAD event (or grid INIT has
been used on a project or two) then a gridrefresh method
selects into gridtempcursor
select gridcursor
zap
append from dbf('gridtempcursor')
use in select('gridtempcursor')
It's more work, but the occasional grid layout going poof is cured.
Tracy
-----Original Message-----
From: Dave Crozier
Sent: Thursday, August 20, 2009 3:23 AM
Sounds like you are resetting the grid Recordsource.
Before you do the query set the recordsource to " " on the grid, then do the
requery and then set it to the cursor you have queried.
If this isn't the reason then is the combobox source an SQL Select or
another type such as alias or fieldlist? Knowing will help to solve the
problem but personally I would make the source an SQL select statement into
a discreet cursor.
Dave Crozier
-----Original Message-----
From: Tina Currie
Sent: 20 August 2009 06:41
Hi all,
First time posting to ProFox - hoping someone can help me as I've wound
myself into a bit of a knot with this challenge.
I have an order table and I'm grabbing a subset (by SQL query) into a cursor
that is readwrite. I use this cursor as the recordsource for a grid on my
form. Purpose of the form is to give the user ability to update 1 field -
they are assigning a truck driver to each order. The driver details are
from a drivers table and I'm using the firstname field as the rowsource for
a combobox within the grid.
User can choose what data to show in the grid by picking a date range from a
date picker control. Doing this runs the query again and updates the grid -
but every time this happens, I lose the combobox control in column2!
What am I missing?
TIA,
Tina
Thanks guys,
I grabbed this little gem off the internet - guy called Andy Kramek. Sounds
pretty much just what you're doing Tracy. It's working a treat!
****The little gem***************************************
LPARAMETERS tcSql, tcAlias
LOCAL lnSelect, lcSql
*** Preserve Work Area
lnSelect = SELECT(0)
*** Cursor does not exist
IF NOT USED( tcAlias )
*** Create it directly
lcSql = tcSql + " INTO CURSOR " + tcAlias + " READWRITE"
&lcSql
ELSE
*** Cursor does exist, use a safe select here
lcSql = tcSql + " INTO CURSOR curdummy"
&lcSql
*** Clear and Update the woirking cursor
SELECT (tcAlias)
ZAP IN (tcAlias)
APPEND FROM DBF( 'curdummy' )
USE IN curdummy
ENDIF
*** Restore work area and return status
SELECT (lnSelect)
RETURN USED( tcAlias )
***********************************************************************
All the best,
Tina
----- Original Message -----
From: "Tracy Pearson" <tracy@powerchurch.com>
To: <profox@leafe.com>
Sent: Thursday, August 20, 2009 11:35 PM
Subject: RE: Quirks of using controls within a grid
>I like to create the grid cursor in the form LOAD event (or grid INIT has
> been used on a project or two) then a gridrefresh method
> selects into gridtempcursor
> select gridcursor
> zap
> append from dbf('gridtempcursor')
> use in select('gridtempcursor')
>
> It's more work, but the occasional grid layout going poof is cured.
>
> Tracy
>
> -----Original Message-----
> From: Dave Crozier
> Sent: Thursday, August 20, 2009 3:23 AM
>
> Sounds like you are resetting the grid Recordsource.
>
> Before you do the query set the recordsource to " " on the grid, then do
> the
> requery and then set it to the cursor you have queried.
>
> If this isn't the reason then is the combobox source an SQL Select or
> another type such as alias or fieldlist? Knowing will help to solve the
> problem but personally I would make the source an SQL select statement
> into
> a discreet cursor.
>
> Dave Crozier
>
>
> -----Original Message-----
> From: Tina Currie
> Sent: 20 August 2009 06:41
>
> Hi all,
>
> First time posting to ProFox - hoping someone can help me as I've wound
> myself into a bit of a knot with this challenge.
>
> I have an order table and I'm grabbing a subset (by SQL query) into a
> cursor
> that is readwrite. I use this cursor as the recordsource for a grid on my
> form. Purpose of the form is to give the user ability to update 1 field -
> they are assigning a truck driver to each order. The driver details are
> from a drivers table and I'm using the firstname field as the rowsource
> for
> a combobox within the grid.
>
> User can choose what data to show in the grid by picking a date range from
> a
> date picker control. Doing this runs the query again and updates the
> grid -
> but every time this happens, I lose the combobox control in column2!
>
> What am I missing?
>
> TIA,
>
> Tina
>
>
>
>
>
>
That's guys name sounds familiar! Isn't he the one that did that Midi
App using FoxPro? I tried that link from our list here over the weekend
(as I get blocked by Barracuda here at work - since its Geocities).
-K-
-----Original Message-----
From: profoxtech-bounces@leafe.com [mailto:profoxtech-bounces@leafe.com]
On Behalf Of Tina Currie
Sent: Monday, August 24, 2009 10:12 AM
Thanks guys,
I grabbed this little gem off the internet - guy called Andy Kramek.
Sounds pretty much just what you're doing Tracy. It's working a treat!
****The little gem***************************************
LPARAMETERS tcSql, tcAlias...
Assuming your tongue is not firmly planted in your cheek, Kurt, Andy is a F=
oxpro MVP going way back. He's the co-author of many VFP books and a long-t=
ime contributor to the various VFP trade mags over the years. Personally I =
find his take on VFP/database/development topics to always be well thought =
out and clearly written.
rk
-----Original Message-----
From: profoxtech-bounces@leafe.com [mailto:profoxtech-bounces@leafe.com] On=
Behalf Of Kurt Wendt
Sent: Monday, August 24, 2009 11:13 AM
To: profoxtech@leafe.com
Subject: RE: Quirks of using controls within a grid
That's guys name sounds familiar! Isn't he the one that did that Midi
App using FoxPro? I tried that link from our list here over the weekend
(as I get blocked by Barracuda here at work - since its Geocities).
-K-
Nope - I'm quite serious - I think that was the guy who did that App. On
the guys webpage - he sound EXTREMELY knowledgeable of
"VFP/database/development topics" - so it sounds like he may be the guy.
And, I would have confirmed before I wrote my last response - but, as
noted - I am blocked here at work.
Here was the link I was referring to from a previous thread:=09
http://www.geocities.com/tablizer/foxmusic.htm
I would not be surpised if Andy is the one on that webpage - as I am
sure many VFP people have other side lines that are not quite related
(Music being the sideline of the VFP programmer on that webpage). As my
sideline is 3D animation.
-K-
-----Original Message-----
From: profoxtech-bounces@leafe.com [mailto:profoxtech-bounces@leafe.com]
On Behalf Of Richard Kaye
Sent: Monday, August 24, 2009 11:19 AM
Assuming your tongue is not firmly planted in your cheek, Kurt, Andy is
a Foxpro MVP going way back. He's the co-author of many VFP books and a
long-time contributor to the various VFP trade mags over the years.
Personally I find his take on VFP/database/development topics to always
be well thought out and clearly written.
rk
-----Original Message-----
From: profoxtech-bounces@leafe.com [mailto:profoxtech-bounces@leafe.com]
On Behalf Of Kurt Wendt
Sent: Monday, August 24, 2009 11:13 AM
To: profoxtech@leafe.com
Subject: RE: Quirks of using controls within a grid
That's guys name sounds familiar! Isn't he the one that did that Midi
App using FoxPro...
I think that's someone else. The copyright notice says Findy Services and B=
. Jacob. Andy's blog can be found here - http://weblogs.foxite.com/andykram=
ek/
rk
-----Original Message-----
From: profoxtech-bounces@leafe.com [mailto:profoxtech-bounces@leafe.com] On=
Behalf Of Kurt Wendt
Sent: Monday, August 24, 2009 11:31 AM
To: profoxtech@leafe.com
Subject: RE: Quirks of using controls within a grid
Nope - I'm quite serious - I think that was the guy who did that App. On
the guys webpage - he sound EXTREMELY knowledgeable of
"VFP/database/development topics" - so it sounds like he may be the guy.
Here was the link I was referring to from a previous thread:=09
http://www.geocities.com/tablizer/foxmusic.htm
I would not be surpised if Andy is the one on that webpage - as I am
sure many VFP people have other side lines that are not quite related
(Music being the sideline of the VFP programmer on that webpage). As my
sideline is 3D animation.
-K-
OK - now its time to open mouth & SQL-Insert a Foot!
I knew the name sounded familiar - and I saw his name recently - and now
I know why, since I STILL had the webpage open - with his VERY
interesting discussion about the Use or MisUse of Public Var's - and
link that was posted last week by someone on the list here:
=09
http://weblogs.foxite.com/andykramek/archive/2009/08/18/8790.aspx
My Bad...
-K-
-----Original Message-----
From: profoxtech-bounces@leafe.com [mailto:profoxtech-bounces@leafe.com]
On Behalf Of Richard Kaye
Sent: Monday, August 24, 2009 11:45 AM
To: profoxtech@leafe.com
Subject: RE: Quirks of using controls within a grid
I think that's someone else. The copyright notice says Findy Services
and B. Jacob. Andy's blog can be found here -
http://weblogs.foxite.com/andykramek/
rk
-----Original Message-----
From: profoxtech-bounces@leafe.com [mailto:profoxtech-bounces@leafe.com]
On Behalf Of Kurt Wendt
Sent: Monday, August 24, 2009 11:31 AM
Nope - I'm quite serious - I think that was the guy who did that App. On
the guys webpage - he sound EXTREMELY knowledgeable of
"VFP/database/development topics" - so it sounds like he may be the guy.
Here was the link I was referring to from a previous thread:=09
http://www.geocities.com/tablizer/foxmusic.htm
I would not be surpised if Andy is the one on that webpage - as I am
sure many VFP people have other side lines that are not quite related
(Music being the sideline of the VFP programmer on that webpage). As my
sideline is 3D animation.
-K-
Quick glance looks like it was a B. Jacobs. The bottom of the page: C
Copyright 1999 by Findy Services and B. Jacobs
Andy is a speaker at many conferences.
-----Original Message-----
From: Kurt Wendt
Sent: Monday, August 24, 2009 11:13 AM
That's guys name sounds familiar! Isn't he the one that did that Midi App
using FoxPro? I tried that link from our list here over the weekend (as I
get blocked by Barracuda here at work - since its Geocities).
-K-
-----Original Message-----
From: Tina Currie
Sent: Monday, August 24, 2009 10:12 AM
Thanks guys,
I grabbed this little gem off the internet - guy called Andy Kramek.
Sounds pretty much just what you're doing Tracy. It's working a treat!
****The little gem***************************************
LPARAMETERS tcSql, tcAlias...