Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. SitesMasstec

    A way to make all ReadOnly

    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...
  2. SitesMasstec

    A way to make all ReadOnly

    Despite using the code Herbstgy suggested thisform.SetAll("ReadOnly",.T.) 2 ComboBox have not stayed ReadOnly:
  3. SitesMasstec

    A way to make all ReadOnly

    Touché, Mike! Yes, a button cannot be read-only.
  4. SitesMasstec

    A way to make all ReadOnly

    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:
  5. SitesMasstec

    A way to make all ReadOnly

    Thanks, herbstgy, it works. All objects are now ReadOnly with the command you provided.
  6. SitesMasstec

    A way to make all ReadOnly

    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...
  7. SitesMasstec

    Combobox populated with data from a table

    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...
  8. SitesMasstec

    Combobox populated with data from a table

    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...
  9. SitesMasstec

    Combobox populated with data from a table

    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...
  10. SitesMasstec

    SetFocus not working

    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...
  11. SitesMasstec

    SetFocus not working

    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...
  12. SitesMasstec

    SetFocus not working

    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:
  13. SitesMasstec

    SetFocus not working

    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...
  14. SitesMasstec

    Update data in a Cursor

    Ein: thank you. I will try to study the commands in your example in this life...🤯 Indeed I have used ICASE / OTHERWISE in much simpler routines.
  15. SitesMasstec

    Update data in a Cursor

    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!
  16. SitesMasstec

    Update data in a Cursor

    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...
  17. SitesMasstec

    Update data in a Cursor

    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...
  18. SitesMasstec

    Update data in a Cursor

    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...
  19. SitesMasstec

    Update data in a Cursor

    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...
  20. SitesMasstec

    Update data in a Cursor

    Well, sometimes it does not work...:rolleyes: Maybe I will have to regenerate the Cursor again, from table... as Mike had advised.

Part and Inventory Search

Back
Top