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 strongm 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. hirick

    GetObjectContext() : why doesn't it work?????

    Are you running your code live? If so, there will be no object context. In order to work in debug and in production, always use the following syntax with ObjectContext: Dim ctxobject As ObjectContext Dim objAccount As Object Set ctxobject = GetObjectContext() if ctxobject Is Nothing then...
  2. hirick

    coding help

    To create the folder, use the FileSystemObject GetFolder and CreateFolder methods. dim strPath as string const strDrive="c:\" strPath= strDrive & txtClaim.text Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.CreateFolder(strPath) ...
  3. hirick

    Updating database design

    NO, data will not automatically transfer from one database to another! 1) If you are updating the code elements and maintaining the same database (and they are not the same file, e.g. a single Access database with both forms and data): When you install a new version of your program, you also...
  4. hirick

    Find out if a string is inside another

    if instr(stuff,"http://")>0 then Msgbox stuff & " is a website!" Else Msgbox stuff & " is not a website!" End If
  5. hirick

    Newbie learning by myself trying to write print statement

    Your code is fine. However, it is writing the value into the Immediate window, and you can't see the window unless you switch back to the IDE and open the immediate window (from the View menu) while the program is still running. If you want to see the result from your executable window, either...
  6. hirick

    coding help

    Good catch Kevin.
  7. hirick

    coding help

    if not objRS1.BOF then objRS1.MoveFirst End if ................................... Alternatively, you could do both tasks while moving through the recordset once: Dim iDoc as Integer, iPic as integer Do While objRS1.EOF <> True MyPic = UCase(objRS1(&quot;Description&quot;)) If MyPic...
  8. hirick

    Complex SQL Query Design Help

    The following will work if there is always a record in plan matching the record in grantz. If not, change the word INNER to LEFT OUTER. Change your FROM clause as follows: JPMC37014.dbo.grantz grantz LEFT OUTER JOIN JPMC37014.dbo.exercise exercise ON grantz.GRANT_NUM =...
  9. hirick

    Insert row ...key violation

    Ryan, is LnMemoCounter was an identity field (equivalent to an AutoNumber in Access)? If not, can you make it into an identity? Holly Irick
  10. hirick

    Select TOP N records for each group

    I think you have to do it with a cursor and a temp table. Retrieve all the machine numbers into your cursor, loop through it to append the top 15 rows for that machine. Then select * from the temp table.
  11. hirick

    Can't get the results I want using max

    Try this. It looks simpler: Select A.Name, A.Points, A.Year From tblPoints A Inner Join (Select Max(Points) As MaxPoints, Year From tblPoints Group By Year) B On B.MaxPoints = A.Points And B.Year=A.Year Order By A.Year If...
  12. hirick

    ADO database locking and timeout

    The indefinite hang-up in your first message was probably caused by attempting to return a recordset from an update query. Update queries don't create recordsets. Is your table indexed on the fields in the where clause? You didn't say how long it takes to update the table if only one PC is...
  13. hirick

    Update Query....Ignored???

    CommandTimeout should be one word, not 3.
  14. hirick

    help

    Are you viewing your page through localhost, or just opening it in your explorer window?
  15. hirick

    4 fields, all numbers need to select max...

    Better yet, why not normalize your data? Create a new table, with fields FishId, MeasurementType, and FishLength. (MeasurementType will identify the 4 columns you used in your current table). Then all you need is a simple update query with a select max(FishLength).
  16. hirick

    Stored Procedure Errors

    @@error is the value returned by the system from the previous statement. You don't set it. Also, as soon as you use it (for instance, if @@error <> 0), it will be reset to zero. In your procedure, try this: Declare @error int Declare @errmsg varchar(200) Set @errmsg='' ... Update myTable Set...
  17. hirick

    How do I move the focus to a link?

    This works! I wouldn't have thought of that combination. Thank you.
  18. hirick

    Visual Basic linked to a Database

    What do you mean by a robust database? Access works very well for 10-20 users and databases under 100 MB. Beyond that, it starts having problems. If you have a significantly larger user base or data size, you should consider SQL server or Oracle. Both of these are much more expensive than...
  19. hirick

    How do I move the focus to a link?

    I want to put my &quot;Previous Page&quot; and &quot;Next Page&quot; links into a separate frame, so they'll always be in the same place and I don't need to copy them into every page. When I tab to the frame, first the window gets focus, and then I need to tab to the Previous Page link. I've...
  20. hirick

    SQL Query

    You need something like this: Select department, count(table2.document_id) From table3 Inner Join (table2 Inner Join (Select table1.document_id From table1 Where conf_code='show' Or table1.document_id In...

Part and Inventory Search

Back
Top