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: *

  • Users: ogri
  • Order by date
  1. ogri

    BulkEditGridView

    Hi It supports most. I will investigate the RowDataBound event. There already is a drop down for each row, but they all have a common source. Selected value isn't a problem. It is having a slightly different source (ie, needing a parameter) for each row. Hopefully I can set that with the event...
  2. ogri

    BulkEditGridView

    Hi I have a web page I need to modify that uses the BulkEditGridView from realworld.grids.dll. Up to now this has done the job. I need to amend the page slightly and the result is that a drop down list on each row needs a parameter from that row. Ie, one of the fields is a list of people, but...
  3. ogri

    Select case

    Hi Problem is (I think) the multiple declarations:- Dim stDocName As String Dim stLinkCriteria As String The declarations are "executed" irrespective of their position within If statements, so you are trying to declare each variable twice. All the best Keith
  4. ogri

    Looking for better coding advice

    Hi Basically those 3 lines (actually one line of code, it has just overflowed onto three lines when displayed here) would replace the entire contents of the subroutine. Private Sub Command23_Click() [Orders]![Date_Due_Refill] = DateAdd("m", GetMonthsToAdd(Insurance , [Orders]!HCPC)...
  5. ogri

    Looking for better coding advice

    Hi Possibly being a bit picky here, but would it not be better to have a table of months to add for insurance / hcpc, so you can easily update them in the future without having to delve into the code. It is easy to call a function to check the data on the table via a query and return a value...
  6. ogri

    What's So Bad About Using GoTo

    Hi Glad you got it sorted. I can certainly see your temptation to use a single exit point. I suspect you are correct that a function call is not the most efficient solution, but due to the way VB evaluates IF statements it is semi forced in this situation. Some other languages will evaluate...
  7. ogri

    What's So Bad About Using GoTo

    Hi Quick play and I have done this. Have not executed it, but should work (not needed to pass complete arrays to functions before). Option Compare Database Option Explicit Private Function FirstCase(intNumComp As Integer, varLenCsz As Variant) As Boolean If varLenCsz(intNumComp) = 5...
  8. ogri

    What's So Bad About Using GoTo

    Hi While goto can be justified sometimes, it is something I try to avoid. Rather too easy to code in an endless loop with careless use of constructs such as "On error goto....", and they are likely to be a nightmare to find. As to using 3 variables with the case statement, easy enough for each...
  9. ogri

    Smoothing data

    Hi Cheers for that. Now I know what to look for. Hopefully can take the Fortran code and work something out. Background wise, been coding for about 20 year, in pl/1, Cobol, VB and a few other nasties. All the best Keith
  10. ogri

    What's So Bad About Using GoTo

    Hi One way to do it would be Select case true case check first line to be edited do editing case check 2nd line to be edited do editing case else End select Although that does land up with fairly complex case statements (although if you wanted to you could hive each check off into a function...
  11. ogri

    Smoothing data

    Hi Probably best to tell you what I am trying to do. Basically it is for doing some calculations on an engines power output at certain rpm. But from a limited number of points. eg, have the power known at 1500rpm, 4000rpm, 5000rpm, 6000rpm, 6500rpm, and from that want to produce inbetween...
  12. ogri

    Smoothing data

    Hi I have a need to take some data and produce a smoothed set of data containing the inbetween values. Rather like a smoothed graph, except I need the values to do some calculations on rather than just display them. Any common routines I can use to pass a small subset of data and the call to...
  13. ogri

    What's So Bad About Using GoTo

    I can think of one time when I had to use a goto (and that was in PL/1 which has limited error handling, jumping out of an error handling routine for certain expected errors). In VB based code, just embed the code in a large if...then...end if . If that is unreadable then hive some of the code...
  14. ogri

    How to show indentation?

    Hi My point is that the sorting only works if you have already got the levels of indentation / order already precalculated. Easy enough on static data, but the more often it changes the less useful this would be. All the best Keith
  15. ogri

    How to show indentation?

    Hi Can see how it would remove the use of recursion (and fair enough if you want to avoid any overhead like that), although I am a bit dubious that it would be easier to query / update the resulting tables (although deleting would certainly be easier). Personally I think the recursive method...
  16. ogri

    sql: output to numerice field

    Hi In theory you should not have the quotes around those numeric fields but in practice some SQL based databases will cope with it. All the best Keith
  17. ogri

    How to show indentation?

    Multiple connections should not be required, although you will have multiple recordsets open within that conection. Each recordset should be small, and properly keyed should perform well enough. Advantage of doing it recursively is that there is no need to know or calulate the levels of...
  18. ogri

    How to show indentation?

    Hi Seems like a perfect situation to use a recursive function. Have each call of the function get a level of employees under a supervisor. The output those, so you just have to format a single indent at a time. For example (psuedo code) Function WriteSubordinates(parmEmployeeRef) [tab]Select...
  19. ogri

    Having trouble grouping query output

    Hi You definatly need an order clause to force them into the appropriate order. Only thing I can think of is that the flavour of SQL you are using does not like ordering on a derived column (ie, from the subselect), but the join is a better way of doing things anyway. All the best Keith
  20. ogri

    working with an array

    Hi Think you want something like this then. strInventoryIDs = Replace(strInventoryIDs,"inv","") arrInventoryIDs = Split(strInventoryIDs,"~") strSQL = "Select InventoryID" _ & "decode(RateValue,ExtraPersonCharge,'Same','Different') " _ & "WHERE InventoryID...

Part and Inventory Search

Back
Top