Results 1 to 11 of 11
  1. #1
    Join Date
    May 2006
    Posts
    4

    Unanswered: Drop downs in a form

    I am building a customer order database for a client and have this problem: I would like to be able to display a form that shows all a customer's order information ( pretty standard stuff, first name, last name, address, phone, etc.) but then would also like to display what they ordered as a drop down. Many of the customers are repeat customers, and so they will have multiple order records in the datatbase, but I would like to somehow display them in the customer profile form all in one form.

    Any help on how to go about this appreicated.

    thanks in advance

    johnmr

  2. #2
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,418
    Provided Answers: 7
    Why not break the screen in haft

    top haft showing the Customer info

    the the 2rd haft

    which is a sub form showing the Orders info

    The trick is Master Link<=>Child Link
    Once this has been set up the hard bit is done
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  3. #3
    Join Date
    Apr 2006
    Posts
    157
    hey I do like the idea of a drop down

    maybe he can set up a button on click to adjust the form size and reveal it,

    meanwhile the normal form size would reveal only the top half, so set minmax buttons to disabled, same with form sizable.

    just get the height of the full form revealing the subfrm orders

    dim subfrmexposed as boolean
    set to false on load


    button_onclick()


    if subfrmexposed = true then

    subfrmexposed = false
    form.height = "half exposed height"

    else

    subfrmexposed = true
    form.height = "full height"

    endif

    of course there's probably a more efficient way
    but my middle name is reckless abandon
    just patch code in like legos
    Only quitters quit!

  4. #4
    Join Date
    Jul 2005
    Posts
    144

    Talking try this

    here you go
    hope it helps
    Attached Files Attached Files

  5. #5
    Join Date
    May 2006
    Posts
    4
    Quote Originally Posted by myle
    The trick is Master Link<=>Child Link
    Once this has been set up the hard bit is done
    Myle
    Thanks for the reply. I like your solution showing all orders as a subform. What I am a bit unclear is how to get all the orders for one customer grouped together on the same subform. I assume you would need to find everything for the same first name, last name and some other piece of info, say addres (since there may be two different John Smiths as customers, for example). I assume this is what you are referring to with the "Master Link<=>Child Link" info you gave me, yes? How would I do this and where would this code go? Any help you can give me much appreciated.


    Thanks

    johnmr

  6. #6
    Join Date
    May 2006
    Posts
    4

    Thanks!

    Quote Originally Posted by ranjah
    here you go
    hope it helps
    Very helpful - thanks

    johnmr

  7. #7
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,418
    Provided Answers: 7
    to Johnmr

    in the Master Link<=>Child Link you can

    Link More than 1 feild in the Master Link<=>Child Link

    use a ,between the feilds if feilds have spaces use the [] as well

    It Hard to get it started But Once you have Shit it look good.

    I have one that has 3 feilds linking.
    Last edited by myle; 05-17-06 at 18:11.
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  8. #8
    Join Date
    Apr 2006
    Location
    Huddersfield, UK
    Posts
    154
    greets,

    u should really use a unique identifier for each customer, then in any query you can group by this unique identifier rather than by say [Surname] this will then be able to list your transactions by said customer.

    I'd put in a client/customer ID field on which to base links for transactions, then you'd be able to group by this unqiue number, even if you have 4xJohn Doe's they would all be listed individually, as they would all have seperate ID's and you would only have one of each ID.

    Hope this helps

    Dan
    sometimes simple is best.... and i'm just a simple fellow.

  9. #9
    Join Date
    May 2006
    Posts
    4
    Quote Originally Posted by myle
    to Johnmr

    in the Master Link<=>Child Link you can

    Link More than 1 feild in the Master Link<=>Child Link

    use a ,between the feilds if feilds have spaces use the [] as well

    I have one that has 3 feilds linking.
    Do you have a sample of this code you could share? What I am trying to do is group together all orders from a particular person on a subform. I am guessing that I will need to group on 3 fields - ContactFirstName, ContactLastName and Address.

    As someone else pointed out, the right way is probably to give each customer a unique ID. However, I am getting order information every month from paypal in excel format and going to be importing this in to this database. Paypal doesn't track any kind of customer ID, so if a customer comes back and orders again, they will be another line in the excel spreadsheet, with no way other than what I describe above to track them. Not the most elegant idea, but I don't see a way around doing it this way.

    In any case, any help greatly appreciated.

    Thanks

    johnmr

  10. #10
    Join Date
    Apr 2006
    Location
    Huddersfield, UK
    Posts
    154
    What you could do, is import the customer informaiton from you excel spreadsheet, seperately. Eg Name Address etc, and have that information go direct to your "Customer" table, (and have it prompt you if another customer comes up with the same name and ask you if you wish to overwrite); then import the rest of your "transaction data" to the transactions table, and have them linked to each other.

    I'm sure there would be a way for you to handle this better so that you are not repeating cutomers and in the future you would have lot less problems fitlering/querying data.

    Hope it helps!

    Dan
    sometimes simple is best.... and i'm just a simple fellow.

  11. #11
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Talking

    Hi johnmr

    Firstly, just exactly how do you have your Tables set up? Did you do the One-To-Many Relationship type setup? That would be a really good way to get it all started. That would involve setting your Primary and ForeignKeys to make that work.
    Code:
    tblPatients            tblOfficeVisits
    PatientID            OfficeVisitsID
    PatientName           PatientID
    PatientsAddress       VisitDate
    The trick is the PatientID in the OfficeVisits table. One Patient can have Many office visits.

    Let's see if you're there.
    have a nice one,
    BUD

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •