• WSPeterN

    WSPeterN

    @wspetern

    Viewing 11 replies - 391 through 401 (of 401 total)
    Author
    Replies
    • in reply to: Problem with Event Procedure (A2K-SR1) #649726

      The code that I originally used using the Me Keyword was in the subform’s OnCurrent event as you suggested in the original thread which began with Post 214537.

      My problem is that the Me keyword works fine on one of my forms and won’t work at all one of my other forms. That one hangs with the error message posted today.

      As to what I am trying to achieve: This is a database to manage membership and donations for a church. All Individuals are in the Individuals table (where personal information such as Date of Birth is stored) they are assigned to Families (Where info like address is stored – Our definition of Family being at least one Individual at a single address) through an intermediate table to create the many to many join as in our definition of Family, it is possible for many Individuals to belong to many Families (children of divorced parents being one example).

      When the Families form is opened, the first field is the Family Name field on the main form. When you tab through, you jump to the Individuals subform which works fine except for the problem that if you cursor all the way through the entries in the subform and leave it from the last field (Comments) that is where the cursor ends up apparently due to the way Access is designed (see the thread mentioned above). I want the cursor to always jump to the first field which is IndiviualID whenever you enter the subform by tabbing.

      This is where the code problem is arising, So Mark’s solution, though appreciated is not what I’m looking for as the focus goes to Family Name when the form is opened.

      Some footnotes. The subform works fine except for this refusal to be found when I try to set its OnCurrent event. There is other code in the form which also works fine (such as double clicking on the IndividualID field to be able to open that Individual’s personal info form from the families form and a not in list event to set up a new member(s) from the Families form and add the Individual info on the fly). Both of these much more complicated bits of code work fine on this subform.

      Finally, the Donations entry form also has a subform where I have been able to use Charlotte’s “Me” Code in the OnCurrent event of the subform with no problems whatsoever.

      So the question is: where should I be looking to troubleshoot these runtime error messages as obviously my other attempts didn’t work. I await with eager anticipation your reply and in the meantime, I’ll do some more investigating myself (although I won’t waste time trying crack further the vagaries of VBA syntax. I’ll be happy to strip down a copy of the relevant bits of the database and post it if that will help. And thanks for your suggestions so far.

      Peter

    • in reply to: Problem with Event Procedure (A2K-SR1) #649696

      It seems to me that the code in the previous post should really look like this:
      Dim ctl As Control
      Set ctl = Forms![Family Members]![IndividualID]
      DoCmd.GoToControl ctl

      Did I parse this right?

      Peter

    • in reply to: Problem with Event Procedure (A2K-SR1) #649695

      There are no hidden or invisible controls and the first control can accept the focus. When I have tried to explicitly name the form rather than use Me, then I get an error message that the form can’t be found (error 2450). It seems that even though the form exists, and can be opened, VBA can’t find it.

      I have tried deleting and rebuilding the subform from scratch and still can’t get it to work. I’ve even gone as far as using this as the OnCurrent event (the field I want, BTW, is IndividualID):

      Dim ctl As Control
      Set ctl = Forms![Family Members]![IndividualID]
      DoCmd.GoToControl ctl.Name

      and get the same problem that the Database can’t find the form although if I use the AcessObject.AllForms, I can get the form name to show up in the Immediate Window.

      So what do I do about a form that’s there, that VBA insists isn’t?

      It seems rather a silly problem to have when all I want to do is something as simple as having the focus always go to the first field of a subform.

      Peter

    • in reply to: Problem Communicating with OLE Server (Access 2002 SP1) #646378

      You may want to try the registry hack suggested in the article. I found that worked for me. The other fixes in the options of NAV didn’t seem to do it.

      Peter

    • in reply to: Page Setup Changes (Access 2000) #646188

      I have found it a good failsafe when specific page settings are required for certain reports – I had a database that needed to print triplicate carbonless receipts on a dot matrix and other reports on the laser printer – that you choose “Page Setup” from the File menu with the report in question opened, click on the Page tab of the dialogue box and select “Use Specific Printer” and specify the printer you want. Those page settings seem to be retained with none of the usual arbitrary nonsense (default settings imposing themselves) that you get otherwise. Particularly useful if you have more than one printer/printer driver set up on your computer or if you are on a network.

      Peter

    • in reply to: Odd form behaviour (2000 sr1) #646183

      Thanks for the help and the code. At least I won’t spend more time trying to figure out what is going on in the cases I was mentioning. It does still moot the question as to why the databases I have that are working “correctly” are working in that fashion (i.e. the cursor is going to the first field rather than the one it *left*). If only I knew what I did to make the other ones work properly without code! surrender

      Along the same tack, you say you never use datasheet subforms. What do you use, then? Single forms, continuous forms? Datasheet subforms in the type of application I am dealing with seem to be the most economical in terms of space and entry of info.

      Peter

    • in reply to: Odd form behaviour (2000 sr1) #646039

      I have continued to work on this and tried creating a similar quickie to the attached database at a friend’s place and came up with the same results, which leads me to believe that either I am truly jinxed, or, more likely, that I am missing something obvious in the table/form design and the relationships which I used to know (since lots of my old databases work fine). Hopefully it will be easy for you to find and I can slink into the ether. confused

      Peter

    • in reply to: Odd form behaviour (2000 sr1) #645688

      That was my original thought because I was playing around with that when I was first designing the original database. However, this is now happening in all databases. I even made a quickie from scratch with no code whatsoever last night to test it and it does it there. Is there some place I could have placed offending code that it would affect all databases on this hard drive? i.e. that I’ve changed some sort of setting in Access itself?

      Peter

    • in reply to: Odd form behaviour (2000 sr1) #645675

      The problem is occurring regardless of whether you use the tab key or the enter key to move forward. The problem is quite consistent in always happening when one reaches the second and following records in a session of having the form open. It doesn’t matter whether it is an existing record and you are just scrolling through or a series of new records, whether you use tab or enter. On the second record, the cursor is going to the last field of the subform. Shift+tab is working in reverse. If you start at the end, it will scroll through all the fields and on the next (previous) record, it jumps to the first field in the subform and from there to the main form. (This is presumably standard practice as that is where the cursor is supposed to go in the tab order of the main form)

      Peter

    • in reply to: Problem Communicating with OLE Server (Access 2002 SP1) #645516

      (Edited by charlotte on 15-Jan-03 22:18. to add MSKB link)

      There is a known conflict with Norton Anti-Virus software that creates this error message in Access 2000. I have had it occur when I have inserted graphics in certain formats.

      Here is the reference in the Microsoft Knowledge base: (Q295824)

      Peter

    • in reply to: AutoFill Form (Access 2000) #641201

      Well…

      Aren’t I embarrassed. I had another look after some quiet time away from the monitor and realized I had been entering the name of the control sources “ContributionDate” and “DepositDescription” instead of the field names on the form “Date” and “DepositID”. Once I put in the right info, it worked like a charm!

      Garbage in, garbage out.
      stupidme

      PeterN

    Viewing 11 replies - 391 through 401 (of 401 total)