Search results

  1. A

    Submitting a form name to a function?

    OK, I've got it. Using your line: If Forms(frm_User_Create).Controls(frm_Job_Selection_ CIT).Form.Controls(cbx).Value = True Then I changed it to incorporate quotes around the form names and all is well: If Forms("frm_User_Create").Controls("frm_Job_Selection_...
  2. A

    Submitting a form name to a function?

    Thanks for the effort guys! Applying your syntax I have avoided passing variables and just used literals to get the code working asap. My line now looks like this: If Forms(frm_User_Create).Controls(frm_Job_Selection_CIT).Form.Controls(cbx).Value = True Then ... This seems to be acceptable...
  3. A

    Submitting a form name to a function?

    Thanks but I'm working with a subform at the moment :)
  4. A

    Submitting a form name to a function?

    To be honest I'm not sure. When I break out into the code the function is in a module called functions. If I open the code for the button then the focus jumps from the modules part of the window up to the Access part of the window. Does that make sense? If not I have attached a snapshot of where...
  5. A

    Submitting a form name to a function?

    Thanks but that gives me an error of "Invalid use of Me keyword" :(
  6. A

    Submitting a form name to a function?

    Hi David, I was hoping to achieve this but unfortunately I am still getting an error. My line of code that errors is this: If Forms!frm_Job_Selection_CIT.Controls(cbx) = True Then ... So I have temporarily suspended my quest for automated code and supplied the literal subform name. Alas I...
  7. A

    Submitting a form name to a function?

    Morning all! Yes, I'm afraid it's me again although I have been away for an encouraging length of time haven't I? :) Got what I suspect is a simple question of syntax so I'm hoping a kind soul will be able to point out the correct notation for my command and away I'll go..... What I'm trying...
  8. A

    Merging two queries? Help!

    OK tried that and it works a treat :) Nice piece of lateral thinking that! Thanks again for the help, Andy
  9. A

    Merging two queries? Help!

    Thanks for the swift reply, I'll give that a go. Re the data storage, yeah I know but the data is only residing in this table temporarily. Ultimately it will be merged but that process is still some way off... Thanks again, Andy
  10. A

    Merging two queries? Help!

    Hi guys, I've got two queries, one for a Peugeot franchise and one for a Citroen franchise. Apart from the table name they are the same query. But can I merge the two queries into one for a graph of grand totals? Nope! Anyone got any ideas? The two queries are listed below and I basically want...
  11. A

    Run-time error '2105' - can't go to the specified record

    Cool, thanks for that. Database is working much better now :)
  12. A

    Run-time error '2105' - can't go to the specified record

    OK, I managed to get back early and I've had a look at your comments and reviewed my code. I see what you're saying now. The GoToRecord command actually uses my submitted value against the record count and not the table's primary key :( Looks like I have some code to correct because although I...
  13. A

    Run-time error '2105' - can't go to the specified record

    Thanks for the reply, I'm in a different office today so I'll have to check this out tomorrow. What you have said does make sense though (re session only IDs) so I'll have a look at the find command and keep you posted Cheers, Andy
  14. A

    Run-time error '2105' - can't go to the specified record

    Hi guys, I've got (yet another) weird error on my inherited database. I have a form with the standard navigation buttons in the footer (first record, prev record, next record, last record & new record). When using these to navigate to record 3816 there is no error. However when using a few VBA...
  15. A

    .requery stops working?

    Nope, the refresh meets our needs for the moment so I'm going to leave the code as is thanks
  16. A

    .requery stops working?

    OK thanks for that :)
  17. A

    .requery stops working?

    Nope, don't really know the difference between the two functions...
  18. A

    .requery stops working?

    Nope, no joy I'm afraid. However..... I haven't been idle and have discovered the function .Refresh. Adding in the line Forms!MainFormName.Refresh seems to achieve what I want. I can always add in another call for the function to the subform if I find that lagging behind. If I go with this as...
  19. A

    .requery stops working?

    Actually no, that was my mistake. There is a subform on the form but the listboxes exist on the main form. I have tried using the Forms!MainFormName!Control.Requery notation but no joy sadly :(
  20. A

    .requery stops working?

    Thanks for that but no joy unfortunately :( The listboxes do not refresh and when drilling in to the code I get the same error. Any other ideas? I think you're thinking along the same lines as me (a scope problem) but I'm clueless... Cheers, Andy
Back
Top Bottom