Hi,
No offense, but the shown code snippet simply doesn't make sense
n = THISFORM.text1.Value
IF EMPTY(n)
RETURN
ENDIF
n = VAL(n)
SELECT Roba
IF !USED("Roba")
MESSAGEBOX("Table 'Roba' is not open.")
RETURN
ENDIF
LOCATE FOR Sifra = n
Adapting it you might want to write something like below...
Hi,
The combo/list box has no ReadOnly property either. You may want to check all the controls you use whether they may be set ReadOnly or switch to Enabled (.T./.F.)
hth
MarK
Hi,
Delimited has more options: delimited with ... and delimited with character ... Please have a look at the Help file or see below (From Hacker's Guide to VFP 7)
hth
MarK
Hi,
You may of course have a look at the local or remote view and how it is created. But in this case it's overkill - you simply need a (filtered) cursor e.g.
Select ... from ... where ... into cursor csrTemp
hth
MarK
Hi Tom,
You're right: Cathy Pountney's book is excellent.
Below 2 demos (one with flat data and one with grouped data) to show the trick. There is however a little gotcha - you loose a few lines in the detail band since the footer stretches on last page.
hth
MarK
Hi,
You may want to move the subtotals and the totals to the page footer and make it flexible with "Print only when expression is true" and "Remove line if blank". Demo attached
hth
MarK
Hi
No, you need correctly coded filter conditions - see below
SELECT LOCALIZA, EMISSAO, CODAGENTE, NOMAGENTE, NOMECIA, NOMENAV, DATASAIDA, DOCUMENTO ;
FROM RESERVAS WHERE ;
BETWEEN(EMISSAO, XQualPDEmissao, XQualUDEmissao) AND ;
IIF(EMPTY(XQualCia), .T. , NOMECIA =ALLTRIM(XQualCia) ) AND ...
Hi
NO - since the two filter conditions
are always TRUE - think about it : you set xqualcia and xqualnav either empty or NOT empty which doesn't make sense
MarK
Please do also have a look at the BETWEEN() function
instead of
(EMISSAO>=XQualPDEmissao AND EMISSAO<=XQualUDEmissao)
try
BETWEEN(Emissao, xqualpdemissao, xqualudemissao)
MarK
That's an option - better : you SET those values in your main starting program.
But please check the scope of the settings - some of SETtings are global whereas others are scoped to the DATASESSION
MarK
...
Best would be
SELECT ... INTO CURSOR curReservas READWRITE
SELECT curReservas
INDEX ON LOCALIZA TAG LOCALIZA && Is this indexing the CURSOR curReservas? (1)
INDEX ON EMISSAO TAG EMISSAO && Is this indexing the CURSOR curReservas? (1)
INDEX ON NOMAGENTE TAG...
Hi,
... and for those who prefer the datepicker demo in code
**************************************************
PUBLIC goFDOne, goFDTwo, goFDatePicker
goFDOne = NEWOBJECT("frmFDOne")
goFDOne.Visible = .T.
goFDOne.Show
goFDTwo = NEWOBJECT("frmFDTwo")
goFDTwo .Visible = .T.
goFDTwo .Show...
Hi,
If you don't want to work with ctl32_datepicker you may want to write your own datepicker. The attached demo project shows how to do. It is less fancy than the ctl32_datepicker but the code is VFP only
In order to run the demo:
- Copy the .zip file into a test folder
- Unzip it there
- Run...
Sidenote
Hi,
If you're working with DBCs and the RI builder don't forget to run it again. Please have a look at thread https://www.tek-tips.com/threads/trigger-failed.1638030/
hth
MarK
Hi
Well then you misread it - or I don't get what you want
Btw, if SPARSE = .T. then you don't need the DYNAMICCURRENTCONTROL since only the cell that has focus activates the combobox.
hth
MarK
Hi,
You need some kind of "flying" cursor as the RECORDSOURCE of the combobox. Perhaps the attached demo code will give you some hints.
Please be aware though that the underlying control MUST accept the returned values - you can't mix values of different types. Furthermore the described...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.