Learning from you dear colleagues, the problem was solved this way:
thisform.SetAll("ReadOnly",.T.) && For all objects, except Buttons, ComboBoxes, etc(if any other object)
thisform.cboEmbarque.Enabled = .F. && For the ComboBox...
Interesting point, Griff.
The button to exit the form is Read Only, as expected.
But I will try to understand why it works when clicked (the form is indeed released!):unsure:
Hello colleagues!
I have a form with dozens of objects (ComboBox, TextBox, etc) for data entry. And I can alter previously recorded data in this form.
Is there a way to make all these objects Read Only, without having to declare each object in the form .ReadOnly=.T. ?
(there is no...
Hello, Igor!
About your 2) note: The 2.000 records (just field of names) in the combobox appears in alphabetical order and the user can type J and the combobox shows the first names starting with J. The user can continue typing, for example, Jo, and the combobox shows names starting with Jo...
Mike:
Setting ListIndex=0 for the Combobox did not work for the highlighted in blue, above.
In the area highlighted in red, I already use a clean button to deselect eventual selecting if the user click the down arrow of the Combobox/es and want to give up selection/s.
Mike and Paul:
In the...
Hello colleagues!
In my form (bellow) I give the user the option to select a name from a table (names are showed in alphabetical order).
The user can filter the result of the report by a chosen name, or he/she can leave it blank. I achieved this by appending a blank record to the table.
For...
I have just put this in the textbox QualPDEmissao, Valid event: (and nothing in the LostFocus event)
IF EMPTY(this.Value) OR this.Value>thisform.QualUDEmissao.Value
this.BackColor = RGB(255, 128, 128)
RETURN .F. && This stops the cursor from moving to the next field
ELSE...
Solved, following your advices:
I put in the Valid event:
IF EMPTY(This.Value)
this.BackColor = RGB(255, 128, 128)
RETURN .F. && This stops the cursor from moving to the next field
ELSE
this.BackColor = RGB(255, 255, 255) && Reset to default color if valid
RETURN .T.
ENDIF...
SoftwareRT: I put your provided code in the LostFocus event and the result was the same: the mouse cursor went to the next field.
Martinkk: I put the code in the Valid event only and this was the result:
Hello, colleagues!
I created a form, which has a field for date, which must not be blank: the user must type a date.
If the field for the date LostFocus and is blank the field becomes red and the cursor have to stay in the field (please see bellow).
But when I run it, if I leave the field...
Great, Mark! It works now!
I have never used the command IIF. I will dive into it now, to understand how to used it, and when to used it.
I have already seen examples using it (IIF) but have never paid attention to it. It is a powerful command.
Many thanks!
Hello, Mark.
NOMECIA and NOMENAV are fields in the Cursor curReservas.
XQualCia and XQualNav are variables that keeps options.
For example, if I left a combobox without choosing a company, XQualCia will be equal to "".
I think that if choose "NORWEGIAN", only records which has NORWEGIAN in...
Following Pieter suggestion, I tested this:
SELECT LOCALIZA, EMISSAO, CODAGENTE, NOMAGENTE, NOMECIA, NOMENAV, DATASAIDA, DOCUMENTO FROM RESERVAS WHERE ;
(EMISSAO>=XQualPDEmissao AND EMISSAO<=XQualUDEmissao) AND ;
(XQualCia="" OR XQualCia=ALLTRIM(NOMECIA)) AND ;
(XQualNav="" OR...
Well, it worked this way:
RowAtiva=thisform.Grid1.ActiveRow && Record position in the Grid
RowRelativa=thisform.Grid1.RelativeRow && Showed visible position in the Grid
IF (RowAtiva-RowRelativa)>0
FOR AVANCAR=1 TO (RowAtiva-RowRelativa)
thisform.Grid1.DoScroll(0)
NEXT...
Mike is correct,
SET FILTER TO <your filter condition here> IN curReservas
indeed woks fine!
I had said in my above post "... sometimes it does not work" just because, after applying the filter, some lines in the Grid became invisible! If I scroll up the grid all (correctly filtered) rows...
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.