Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 35
  1. #16
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917

    Quote Originally Posted by Wayne311 View Post
    Data is not the issue...just lots of experimental crap in there. I will attach it and hope you can sort through it.
    Wayne311,
    You can create a new db and only *import* the form and tables necessary. Then zip and upload the sample db.

  2. #17
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Wayne311,
    Here's a link you may find useful: http://www.mvps.org/access/forms/frm0031.htm

  3. #18
    Wayne311 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    91
    That worked, I think. Thanks for the link.

    Wayne

  4. #19
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by Wayne311 View Post
    That worked, I think. Thanks for the link.

    Wayne
    good for you Wayne!!! I'm now back, but it's too late it looks like.

  5. #20
    Wayne311 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    91
    Adam,

    I am not sure what you think was solved...not my question. RG told me how to attach just the tables and forms involved with what you requested instead of sending all my experimental musings!

    Any thoughts on the problem with the expression?

    Wayne

  6. #21
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by Wayne311 View Post
    Adam,

    I am not sure what you think was solved...not my question. RG told me how to attach just the tables and forms involved with what you requested instead of sending all my experimental musings!

    Any thoughts on the problem with the expression?

    Wayne
    sorry about that! just looked at the end of the thread and thought it was.

    I have to install a trial of 2010 on this netbook. I'll get back to you here shortly when I do that and see what you've got.

  7. #22
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Wayne,

    I didn't have time to figure out your relationships and such, but whatever process you're going through, this should work fine in the AFTERUPDATE event of your "District" textbox:
    Code:
    Private Sub District_AfterUpdate()
    
    Me.Text13 = DLookup("Charge", "Districts", "[District]=" & Me.District)
    
    End Sub
    go to the prop sheet for the textbox, click that event and paste that code on into the code window

  8. #23
    Wayne311 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    91
    That gave me an error...see attached.

    Wayne

  9. #24
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Well Wayne,

    take a look at the picture. Is that the way you want it to work??

  10. #25
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    alright Wayne. I dropped all the source, and gave you an example.

    attached is it. put a number in the top left box and see the charge appear.

    Regardless of whether a parent child relay is present, you would have eventually run into the fact that your ID field in the table is TEXT, not a number.

    vba syntax is different for these two datatypes, and confusing to boot.

  11. #26
    Wayne311 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    91
    Adam,

    That is interesting. I was trying for that in the text box below the one you used, but that works too. During all of this the field DISTRICT has been both text and a number. As it has no need to be calculated, I wasn't sure if it mattered.

    Now I am puzzled as to why there are errors with every field of the form relating to table RCPTDATA. One problem solved...13 new ones created. Could this be due to the relationships and the junction table?

    Thanks for the help
    Wayne

  12. #27
    Wayne311 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    91
    Attached is a picture of all of the RCPTDATA errors. But it shows your fields work!

    Wayne

  13. #28
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by Wayne311 View Post
    Adam,

    That is interesting. I was trying for that in the text box below the one you used, but that works too. During all of this the field DISTRICT has been both text and a number. As it has no need to be calculated, I wasn't sure if it mattered.

    Now I am puzzled as to why there are errors with every field of the form relating to table RCPTDATA. One problem solved...13 new ones created. Could this be due to the relationships and the junction table?

    Thanks for the help
    Wayne
    No Wayne,

    I told you that I deleted the sources for the forms. I said that in the last post. that's why there are errors. I did that to prove to myself that your errors weren't caused by an undetected problem.

    Take the code that you see in my example and put it right on into your original file. Make sense?

    Your orig file doesn't have those errors. I created them on purpose.

  14. #29
    Wayne311 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2011
    Posts
    91
    OK, now I think I got it.
    That gives some help with what the heck the “#Name?” error is…I wonder about what causes that. Also I still wonder why my original expression didn’t work. With Access there are several ways to do something, is there a reason some work and some don’t? Do we have to try them all to see what works?

    Now that the cost associated with one district is captured. The receipt allows multiple district charges for one receipt; my next task would be to create an unbound text box to calculate the total district charges in one receipt. Is that the right direction to go with that?
    Thanks for hanging in with me.
    Wayne

  15. #30
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by Wayne311 View Post
    my next task would be to create an unbound text box to calculate the total district charges in one receipt. Is that the right direction to go with that?
    yes, but use DSUM() instead

Page 2 of 3 FirstFirst 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Pass Subform filter to subform in report
    By camftm in forum Programming
    Replies: 16
    Last Post: 07-19-2011, 07:12 AM
  2. Replies: 15
    Last Post: 11-09-2010, 04:27 PM
  3. Subform Question
    By Desverger in forum Forms
    Replies: 1
    Last Post: 08-11-2010, 02:42 PM
  4. Data from one subform to anther subform
    By scotribs in forum Forms
    Replies: 3
    Last Post: 03-09-2010, 09:53 AM
  5. Replies: 1
    Last Post: 12-10-2005, 04:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums