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

  • Users: ntp
  • Order by date
  1. ntp

    Creating Filtered Reports

    Thanks for the interset but I solved the problem myself. It seems I was supposed to load the DataEnviroment object then test the state of the recordset i was trying to update and if it was open I needed to close it. Then I updated the SQL and refreshed the report object. The code I used was...
  2. ntp

    Creating Filtered Reports

    I'm creating a front end to a MS Access DB linked to a Ctree++ Db using VB. I want to create a report based on some selections the user checks on a form. For example the user selects the various types of services to be reported for and the report is supposed to show all the vendors who offer...
  3. ntp

    How to bind a text box on a form to a specific field?????

    =DLookUp("[Cost per Metre]","MainTeesQ","[txtMainTcost] =" & [txtMainTcost]) This is wrong. the lookup function is used like this: Dlookup(field1, table, field2 = value) field1 - the field whose value you want to return table - the name of the table/query the...
  4. ntp

    Hard drive remaining space

    Try this code: Private Sub ShowFreeSpace() Dim fs, d, s Dim drvPath as String drvPath = "C:" Set fs = CreateObject("Scripting.FileSystemObject") Set d = fs.GetDrive(fs.GetDriveName(drvPath)) s = "Drive " & UCase(drvPath) & " -...
  5. ntp

    save list box values into a log file

    Run this procedure: Private Sub CreateLogFile() Dim fs as Object Dim a as Object Set fs = CreateObject("Scripting.FileSystemObject") Set a = fs.CreateTextFile("c:\testfile.txt", True) For index = 0 to list0.ListCount-1 a.writeline(list0.itemdata(index)) Next index a.Close...
  6. ntp

    Help with saving options page

    You should save the values to some table so that the options will be available every time the database is run. Make the form based on the table and on closing the form update the table as necessary. When you open the form it will get the data from the table. ntp
  7. ntp

    How to bind a text box on a form to a specific field?????

    you could use DLookup to get the value. Example, me.txtFieldValue = Dlookup For a string value ("[FieldName]", "queryName", "[SomeField] ='" & Somevalue & "'") For a numerical value ("[FieldName]", "queryName", "[SomeField]...
  8. ntp

    Combo Selection Doesn't Update Rest of Form

    I noticed something in your last message >>try to run it in the VBA Editor, it just comes up looking for the macro name. Are you getting the same error when you open the form? Your code should look like this - Private Sub cboEmployeeID_AfterUpdate() me.filter "[EmployeeID] = &quot...
  9. ntp

    Combo Selection Doesn't Update Rest of Form

    yes you need to change Ocmbo0 to cboEmployeeID. I'm sorry I assumed you would have realised my code was only a sample that needed to be adapted to your variables. That is why you were getting the Macro problem. The interpreter did not know what combo0 was so it assumed it was some macro. ntp
  10. ntp

    Combo Selection Doesn't Update Rest of Form

    Your forms data source should be the Training table. The combobox should be bound to the employeeId field and consist of three columns: employeeID, FName, LName. You select an item from the combobox it returns the employeeid. the filter is applied to the form, all training records for the...
  11. ntp

    Combo Selection Doesn't Update Rest of Form

    Your combobox afterupdate event might look like this: Private Sub combo0_AfterUpdate() me.filter "[EMPLID] = " & me.combo0 me.requery End Sub This is assuming your form has a specified data source with a field called EmplID. The filter will return all records with an...
  12. ntp

    Running or not?

    Sounds like your report is taking very long to format itself so you have to wait a long time to actually view the output. Could be that you have a slow machine, little RAM, or extremely complex reports/subreports. ntp
  13. ntp

    Populating a combo box from another combo box

    Put this in the AfterUpdate event of your cmbCategory combobox. ntp
  14. ntp

    searching help

    instead of using the refresh mthod use Requery. datMem.Requery ntp
  15. ntp

    Sorting and scoring

    Manowar, Send me a copy of the database with the table structures, and How you what calculations you need performed. I'll be able to better help you like that. ntp nparray@plipdeco.com
  16. ntp

    Sorting and scoring

    What criteria are you using? let's say you are using the category the person belongs to. Write a function like this: Public Function score(intValue as Integer) as Integer Select case (intValue) case 1: score = 3 case 2: score = 4 End Select End Function Then in your...
  17. ntp

    Sorting and scoring

    Create a query based on the table. Add four expression fields which will return the score for Calls, Speed, Time and Total and then return the TOP 3. There is a reserved word you can use to return the top n records based on the order by specification. ntp
  18. ntp

    .findfirst syntax invalid

    If "test" is a table you can't use the findfirst method unless the field you are applying the criteria to is an indexed field. If that is the case one way to get around is to create a temporary query and base your recordset on that. Example: ... Set qdf =...
  19. ntp

    Create a look-up table?

    Why create a lookup table when a function can more than handle your four possiblevalues. Use caibo's solution. You can call the function in your query wherever you want the numerical value. "Select GetSeason(table1.Season) as NumericalSeason FROM table1" No need to use a lookup...
  20. ntp

    Using fields already in tables using VBA

    If what you are trying to do is perform an action if CNT is greater than 1 then you should do something like Private Sub TheCleaner() On Error Goto TheCleaner_Err Dim rst as recordset Set rst = currentdb.openRecordset("SELECT * FROM Table1") rst.movefirst if rst!CNT > 1...

Part and Inventory Search

Back
Top