Search results

  1. B

    Using Totals row in a table via VBA

    Yeah - underscore would be best. Just a case of stopping myself reaching for the shift-8 key combination! :)
  2. B

    Using Totals row in a table via VBA

    LOL! Prefixing with a * on a table name is a bit of an old habit I've got as a way of bringing it to the top when tables are alpha-sorted. It does cause me issues sometimes when I export to a excel file.... Anyhow, I've tried the code again on a new table and it now works...
  3. B

    Using Totals row in a table via VBA

    Thanks for posts guys. I'll have a check through and see if I can find a problem. The 'Count' field is Long Integer, so no problem there, and I can click the Sum on manually. I can't quite understand why the property is there by default for you guys, but not for me! - I'll do some more...
  4. B

    Using Totals row in a table via VBA

    Hi I did see the post, but when I tried it without creating the property first I got error messages about it not existing? The below gives error 3270 Property Not Found CurrentDb.TableDefs("* Table Counts").Properties("TotalsRow") = True CurrentDb.TableDefs("* Table...
  5. B

    Using Totals row in a table via VBA

    Hi guys I'm back on this after a little break - hope you all enjoyed Easter. Following posts above and some googling I've now got the below - table name is '* Table Counts' and the field I want to total is called 'Count': Dim prop As DAO.Property Set prop = CurrentDb.TableDefs("*...
  6. B

    Using Totals row in a table via VBA

    Thanks for the replies guys - I'll give this a try. Hope you enjoy the weekend! :):):):):):):):)
  7. B

    Using Totals row in a table via VBA

    Yeah, just curious if it could be done really!
  8. B

    Using Totals row in a table via VBA

    Hi both Thanks for replies - sounds like it's not do-able, (though if you can save the Totals row when you close the table then you would have thought it should be possible somehow). I'll have a look at the TotalsRow anyway. This was just for my benefit - I create the table itself from VBA...
  9. B

    Using Totals row in a table via VBA

    Hi Steve Thanks for your reply. I'm familiar with the other methods, I just thought that the Total line was nice to keep on the table - that way I dont need to create a query, report or whatever. I could add a line with total on it, but I like the way the button makes it 'live' so you can...
  10. B

    Using Totals row in a table via VBA

    Hi I've always found the Totals button on the Home toolbar (Access 2013) to be useful to produce this sort of thing: Is there a way to add this row and set it to 'sum' for a given table from VBA? Cheers!
  11. B

    Adding items to general context menu (not on a form!)

    Last piece of the puzzle. This is how you get the currently selected item: Application.CurrentObjectNameAll I need to do now is pass this to my 'hello' function and I'm off and running with whatever I need to do, so I think we're there! Thanks again for your help essaytee - really made a...
  12. B

    Adding items to general context menu (not on a form!)

    OK, tried to post this before but site keeps going down. I'll get this in quick, then review your post next essaytee! - thanks for your help with this - much appreciated!!! I've got a custom function to run as follows: Sub add_menu_item() Dim cmbRC As CommandBar Set cmbRC =...
  13. B

    Adding items to general context menu (not on a form!)

    OK, got this to work - it adds another cut command to the menu: Dim cmbRC As CommandBar Set cmbRC = CommandBars("Navigation Pane List Pop-up") Dim newButton As CommandBarButton Set newButton = cmbRC.Controls.add(msoControlButton, CommandBars("Edit").Controls("Cut").Id)and this...
  14. B

    Adding items to general context menu (not on a form!)

    Wow! this is more response than I expected. I'll run through your suggestions and see what happens. Thanks! :) EDIT: I think it's 'Navigation Pane List Pop-up' I need to look at. To illustrate, it's this one: It will only be for my own use - I would like to run a function which...
  15. B

    Adding items to general context menu (not on a form!)

    Hi there! I don't imagine this is do-able, but just in case..... Is it in any way possible to add items to the context (right click) menu outside of a form, just in Access generally? The idea is, if I right click a table, I get a custom menu from which I can select to run a certain function...
  16. B

    #Name error on form

    Oh dear. From your link it sounds like an SQL backend might work better. I'll give that a try.
  17. B

    #Name error on form

    Thanks for quick replies. Text boxes are bound to the data source, there are no calculated fields. The database is on a WAN. Connection via VPN. Power settings on PCs are set to never sleep.
  18. B

    #Name error on form

    Hi I have an access front end with form with data linked to separate back end database. Both accdb format, Access 2013. Windows 10. 20k odd records on a single form, not continuous. I have a group of 6 users reporting that they are getting #Name appearing in the fields as they work through the...
  19. B

    Combo box in a query

    I can change the row source, but the main issue is how to do all of this through VBA - I can create the query using Createquerydef but I need to know how to put the combo box in, which does not appear to be possible with createquerydef.
  20. B

    Combo box in a query

    OK, here's the query showing a drop-down box: I create this combo box my modifying the field property in the query as follows: SQL for this is just: SELECT Table1.f3 FROM Table1; As you can see the SQL does not contain any reference to the drop-down - this is saved with the query...
Back
Top Bottom