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 TouchToneTommy 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

    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...
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. 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:
  7. 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...
  8. 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.
  9. 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!
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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.
  15. SitesMasstec

    Update data in a Cursor

    Thanks, Mike, I got what I needed, with your help: SET FILTER TO (EMISSAO>=XQualPDEmissao AND EMISSAO<=XQualUDEmissao) IN curReservas I have to insert more options in the filter and I think there will be no problem. Why is it more efficient to regenerate the cursor? (SELECT... FROM table ...
  16. SitesMasstec

    Update data in a Cursor

    Hello colleagues! I have this form, with data in a Grid, with this command: SELECT LOCALIZA, EMISSAO, CODAGENTE, NOMAGENTE, NOMECIA, NOMENAV, DATASAIDA, DOCUMENTO FROM RESERVAS; WHERE (EMISSAO>=XQualPDEmissao AND EMISSAO<=XQualUDEmissao) INTO CURSOR curReservas So, the data in the Grid...
  17. SitesMasstec

    Selecting record from a Grid for use in another form

    Mark: Thanks for advise me! Yes, it would be a great mess. So before SEEK I have to insert SET EXACT = ON. Is it correct? Doug and Mark: About READWRITE, I will not be using it in this Grid, because I am using is just for displaying data. If I click on any of the 5 indexed headers on the Grid...
  18. SitesMasstec

    Selecting record from a Grid for use in another form

    Doug: In my program (PRG) that calls the Form (with the Grid presenting the fields), I put this code and it worked fine: SELECT LOCALIZA, EMISSAO, CODAGENTE, NOMAGENTE, NOMECIA, NOMENAV, DATASAIDA, DOCUMENTO FROM RESERVAS; WHERE (EMISSAO>=XQualPDEmissao AND EMISSAO<=XQualUDEmissao) INTO...
  19. SitesMasstec

    Selecting record from a Grid for use in another form

    A problem has arisen: I have these commands in the colums, headers, for each time the user click on a header, the records are sorted in ascending order. For example, in the column for the header of LOCALIZA field, I have the comands, in the Click event: SET ORDER TO LOCALIZA thisform.Refresh...
  20. SitesMasstec

    Selecting record from a Grid for use in another form

    I agree totally with you, Joe. I also prefer to have the files in a program (PRG), select the records and fields I will use in a form or report, and save then in a Cursor, as I did in the form I am working now: SELECT LOCALIZA, EMISSAO, CODAGENTE, NOMAGENTE, NOMECIA, NOMENAV, DATASAIDA...

Part and Inventory Search

Back
Top