Search results

  1. J

    record count last VISIBLE record

    Thanks for your help everyone, The reason why the script takes 30 seconds is because of the massive amount of data and numerous queries to sum, count etc... also there are 5-6 queries within a query and each table has anywhere from 100,000 to 600,000 records.
  2. J

    Changing linked table location programatically

    Thanks for your help everyone, I modified a few scripts and came up with the following which I will add my other 4 database scripts to, just used 2 for testing at this stage Sub test() Dim dbs As DAO.Database Dim tdf As DAO.TableDef Set dbs = CurrentDb Dim NewLink As String, NewLink1 As...
  3. J

    Changing linked table location programatically

    The problem I have is that there are actually around 6 back end databases that the various tables are linked to, that's why I wanted the if statements, if c:\Jobs, c:\Quotes etc... I did not set the back end databases up this way, just working with pre-existing databases. Maybe if I had a...
  4. J

    Changing linked table location programatically

    I am after a script to change the linked table paths like the following. It will only ever be the path that is changing not the file name and only ever linked tables for each table in tabledefs if table.path = c:\Testing* then table.path = w:\Testing\filename if table.path = c:\Jobs* then...
  5. J

    record count last VISIBLE record

    Hi Steve, That would be an option but we want to know how many total records there are and the recordsource is set manually/VBA not through a query as my boss likes how much quicker vba is compared to queries, we tested one form and vba took 30 seconds, whereas a query took 35, which seems...
  6. J

    record count last VISIBLE record

    The subform height only allows for 14 records to be visible at any given time. Thanks for your help anyway.
  7. J

    record count last VISIBLE record

    The numbers are not off by 1, the problem is that when you select the next record in the subform manually it recalculates based on the record you have selected, I have stopped this from happening by using the script If Me.txtTest = "enabled" Then That way they can only run the update script by...
  8. J

    record count last VISIBLE record

    Forms!BOMPO is the main form 13 is the amount of records visible in the subform (actually 14 as current + 13) The relationship between the form and subform is the subform just lists records and then the main form can be used to print reports etc.... based on the subform data, they are not...
  9. J

    record count last VISIBLE record

    This is the code that I am using in the form event to populate the results, I can use this in any form regardless of the form recordsource as it just counts the total records Private Sub Form_Current() If Me.txtTest = "enabled" Then Dim S1 As String, S2 As String, S3 As String, s4 As String S1...
  10. J

    record count last VISIBLE record

    Because my boss wants the textbox to read as showing items 1-5 of 50, however if you click on record 2 it should still read showing items 2-5 of 50 whereas at the moment it reads showing items 2-6 of 50 which is incorrect.
  11. J

    record count last VISIBLE record

    I can use the following to return the last record count of the subform records, but I want the last record count of the VISIBLE records only. So if records 1-15 are visible then it returns 15 If records 34-49 are visible then it returns 49 RecordsetClone.recordcount
  12. J

    Report Sort Options

    Thanks Connor
  13. J

    subform textbox bordercolor

    Thanks for your help, much appreciated.
  14. J

    Report Sort Options

    I have 3 combo boxes on a form which send the selected values to textboxes which represent the different sort orders for my report that the user can select. Ie. textbox1-3 have the values FONID, FONDesc, FONDate, FONApp, If I select FONID in textbox1 then I want the reports first sort field to...
  15. J

    subform textbox bordercolor

    OK, so I finally got around to trying this. I put a hidden field/ textbox named RecordPointer I put another hidden field/textbox at the Footer named SelectedRecord I put the controlsource of the textbox named RecordPointer as =IIf([PK]=Me.SelectedRecord,"1","0") I set the .OnCurrent event of...
  16. J

    subform textbox bordercolor

    Thanks Smig, I will check it out
  17. J

    subform textbox bordercolor

    Hi Gemma, I have looked at conditional formatting but it doesn't work when you want an on focus event for a textbox (continuous form) when the values are yet to be entered into the textbox, it works based on different values in different records, so all of my textboxes are null when the form...
  18. J

    subform textbox bordercolor

    I am trying to highligh a subform textbox a yellow color on focus. However it is highlighting every textbox in that field as it is a continuous form therefore they are all named ThisCount. Is there a way to highlight just the specific textbox that I am in. I have tried...
  19. J

    Add record to table and provide field ID value for new record

    Thanks Drunkenneo, much appreciated.
  20. J

    Add record to table and provide field ID value for new record

    I have the following script which updates fields in a table. What I am after is a msgbox script to list the ID field value once it is updated. Set rec = dbs.OpenRecordset("Select * from Stk_Merge_Delete_Register") rec.AddNew rec("StkItemID") = [Forms]![MergeItem]![txtStkFrom] rec("RackID") =...
Back
Top Bottom