Ask Experts Questions for FREE Help !
Ask
    jduke44's Avatar
    jduke44 Posts: 407, Reputation: 44
    Full Member
     
    #1

    Mar 29, 2006, 05:38 PM
    Adding customer
    I have been learning and building an ms access database. There version is 2002. I have all my tables built and the forms built. I wanted to be able to add a customer so that it would get included in a drop down box. I can add it the problem is I have to close the form and reopen it so I can see it in the list. Would I have to add code to get this to update automatically or is there something within the properties? Thanks.
    ScottGem's Avatar
    ScottGem Posts: 64,966, Reputation: 6056
    Computer Expert and Renaissance Man
     
    #2

    Apr 4, 2006, 06:36 AM
    You need to requery the combobox after you add the customer. The code would be:

    Me.comboboxname.requery

    But where you put it depends on your work flow.
    jduke44's Avatar
    jduke44 Posts: 407, Reputation: 44
    Full Member
     
    #3

    Apr 7, 2006, 03:04 PM
    Scott, thanks for responding. As you know I am just learning Access so bare with me. I uderstand I am vague in what my project is but when you say to add the code you provided are talking to place it in an event procedure?

    If so what would be my choices? Would I add it under the event tab where it has After Update and so forth. The I would want to build a code? I tried it in different places but it didn't work. I want to learn this on my own (with a little help) so doing it wouldn't be beneficial but if you point me in the right direction, I'm sure I can figure it out. Thanks for your time.
    ScottGem's Avatar
    ScottGem Posts: 64,966, Reputation: 6056
    Computer Expert and Renaissance Man
     
    #4

    Apr 7, 2006, 07:01 PM
    Access is an event driven platform. Code is triggered by events like the update of a control the press of a button, etc. You need to look through the flow of how you are adding a new customer. Somewhere after you add the customer to the table, you need to requery the combo.
    jduke44's Avatar
    jduke44 Posts: 407, Reputation: 44
    Full Member
     
    #5

    Apr 7, 2006, 07:48 PM
    Scott, I think I figured it out thanks to you. After placing the code in various events it worked under the "on Got Focus " event. So I assume once the combobox received control it would requery. I think I am understanding it a little. I might have more questions later. Thanks for your help.
    ScottGem's Avatar
    ScottGem Posts: 64,966, Reputation: 6056
    Computer Expert and Renaissance Man
     
    #6

    Apr 8, 2006, 05:00 AM
    The Got Focus event was certainly a possibility. There were probably a couple of different places you could have put it and have it work.
    jduke44's Avatar
    jduke44 Posts: 407, Reputation: 44
    Full Member
     
    #7

    Apr 11, 2006, 05:57 PM
    It works and I'm happy. As I learn Access I'll hopefully find the more efficient way of doing things. That is if I do any more databases. It's been somewhat fun learning this. I'll probably have more questions in the future. Thanks for your help.
    ScottGem's Avatar
    ScottGem Posts: 64,966, Reputation: 6056
    Computer Expert and Renaissance Man
     
    #8

    Apr 12, 2006, 05:14 AM
    Glad to assist

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Customer Wants refund [ 12 Answers ]

I have a Legal Question, here goes I have a small company that I run in my spare time, Computer work. But anyway, I have sold a complete system to a customer and after a week he wants his money back, a typical non written rule 3-day money back, but that is not written anywhere, in the...

Customer Survey [ 4 Answers ]

How much would you expect to pay for a PC health check?? Basically anti spyware, antivirus scans, defrag and general performace boosting stuff, done by a professional.

Customer Event [ 1 Answers ]

Hi there Want to organise a customer event for top customers and their wives. Should be a lovely evening and I do want to put it under the moto: a different perspective for a bigger picture. Any idea what could be a special event around that? Was thinking of maybe going to an observatory and...

Customer Service Stories [ 1 Answers ]

I'm looking for great customer service stories for a talk I am designing on the subject, and possibly an article as well. Anyone have a story they'd like to share?

Customer services [ 1 Answers ]

What is the importance of customer services in banks?


View more questions Search