Search results

  1. D

    Compose failure

    Many thanks arneglp it's working nicely - and is much better not using Nz and quotes. It was frustrating trying to get it right as Access shut down about 5 or 6 times.
  2. D

    Compose failure

    You are right arnelgp but I pasted the wrong thing It should be where Location is Not null, Yes to 1 and 2.
  3. D

    Compose failure

    I'm wanting to build the Where clause for Dlookup and Access continues to shut down as I attempt to compose the line. The clause I want is Dac =1446 And aName= "A Story" and (Nz([Location],"")="" I've Dimmed c$ as chr$(34) and have (which is failing) x = nz(DLookup("Location", "Table3"...
  4. D

    You are about to update xx rows

    Thanks for the ideas. Yes Junes plan would work fine but I liked CJs and had never come across .recordsaffected so used that. I've error trapping so will see if a cannot update condition needs any changes. Now I have what must be a silly question. Why use Set at all? CurrentDb.Execute sql Right...
  5. D

    You are about to update xx rows

    DoCmd.RunSQL sql I liked the warnings when the number was > 0. Can you know that anyhow ?
  6. D

    You are about to update xx rows

    When this is generated can you know if advance if the number of rows is 0 and thus turn off Warnings Off? And the error message about being cancelled.
  7. D

    Update query troiuble

    Doc_Man if I paste your query shown in Msg 3 as you suggest, I run problems with the chr$(34) characters and the line won't compile. Although I eventually get query's working I can struggle with the quotes and formatting a literal string Vs a variable. Are there any rules or methods for...
  8. D

    Update query troiuble

    Many thanks both, great to get that info. And to remove some parenthese is welcome as much easier to read/edit. I never though to include the extra argument for NZ() so maybe why mine failed. I have struck a few problems with nulls so though to handle them from the start. Although the query...
  9. D

    Update query troiuble

    UPDATE Table2 SET Table2.iType = "ABCD" WHERE (((Table2.iType)="") AND ((Table2.MyID)=9) AND ((Table2.aName)="Costs")); If iType is Null will this cause a problem? I was trying to include NZ() or IsNull but the query builder kept reported an error.
  10. D

    Opening Form to a specific record

    Thanks, 3 commas needed.
  11. D

    Opening Form to a specific record

    Thanks Doc Man. I removed the brackets and used a different method to Open Args. The Bookmark is working just fine. When would GoToRecord be useful? I don't really follow that and how might you know the number to use ? is it not supplied by find (is it) ? But for me if didn't go to that number...
  12. D

    Opening Form to a specific record

    Having a bit of trouble opening a Form to a particular record. First tried DoCmd.OpenForm "MyForm", acFormDS, "Station = '" & Form_frmTest!Place & "'" A field Called "Station" does exist with a record Place but that didn't work. It just opened to the first record. So in Form Load event I put...
  13. D

    Looking for Correct Snbtax

    The suggestion to put the function into a module was certainly doable but I wanted to find why I couldn't get it working where it was. It was already in use as click event in the Form. I did use the syntax shown by Galaxiom in msg 6 but wanted to avoid the underscore. Yes, frmMain was Open. I...
  14. D

    Looking for Correct Snbtax

    Yes it is public. Why do you ask why it's not in a Module ?
  15. D

    Looking for Correct Snbtax

    Gee you can spend hours trying to work this out the simplest thing sometimes. I have a function DoDur in frmMain I want to call from a Module m = Forms("frmMain").DoDur(i) What's wrong with that ? ! Access says Application—defined 0r object-defined error Also I don't get it in the drop down...
  16. D

    Cannot resolve error 2109

    Haha I think it may have been too dumb a question to get any answers! Form1 was still open at the start of Sub GotoCode. So I'm passing the value via Property Let then closing Form2
  17. D

    Cannot resolve error 2109

    A dbl-click event in Form2 should call a Sub in Form1 the close. But Access will not exceute it. It tells me Run—time error '2109': There is no field named 'cboCode' in the current record. And there's not... but why would Access be looking for it ? Should it not just follow the code...
  18. D

    Error assigning a value

    Interesting,... so which is best Galaxiom? Or doesn't it matter much:" And thanks for the explanations. I've never seen that anywhere else. Sorry June I certainly read what you wrote but I was guessing a bit on the meaning (which I assume are the names making up the command separated by "."...
  19. D

    Error assigning a value

    Thank you, I have found 2 things that work Forms!frmTest!subTest2.Form!Single = "ddd" Form_frmtest.Single ="eee" Must admit I don't quite follow it all, but one method better than another? The latter looks tidier.
  20. D

    Error assigning a value

    No, I don't think so. How do I confirm that ?
Back
Top Bottom