Results 1 to 13 of 13
  1. #1
    drunkenneo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    199

    form display with recordset

    I have a table of name, order id, amount


    I need to generate a form such a way of the name is appearing 6 times the name should be initial fname and last name for 7th name and ahead and also appears 12 times then it should be divided as initial fname and lname of more than 6 and fname and initial last name in other more than 12 entries, i want to display same in my form pls help.

  2. #2
    Dal Jeanis is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742

    More Information Required

    I'm sorry, but I don't quite understand what you need.

    I inspected your post one phrase at a time and I honestly have no idea what your form is doing (or not doing) and what it should be doing. I also have no idea what you want to do with the form.

    POSSIBLE SOLUTIONS

    At a guess, you may need to use two subforms to achieve your request, but I can't be more specific until I understand your goal.

    THE DESCRIPTIONS YOU NEED TO PROVIDE:

    Please fill out the following descriptions. Please use simple, complete sentences, like you were explaining what you need to a six-year-old, so that she could tell her daddy.

    I need a form. The form will be used for ___________________
    (Please describe the purpose of the form.)

    Lines 1 thru 6 of the form need to have the following format:
    (init, fname, lname, what else?)

    Lines 7 thru 12 of the form need to have the following format:
    (fname, init, lname, what else?)

    The reason these formats need to be different is________________
    (Please describe the purpose of the difference.)

    There can be up to __________ lines on the form.
    (Enter a number, or say "unlimited")



    When we get the above descriptions, then we can give you some suggestions on how to approach your issue. As I said, one solution may be to use two different subforms. Another may be to create a calcualted field using an IIF with two different "formulas" that format the name field differently based on the record number.

    It all depends on the purpose of the form, and the reason they need to be different.

  3. #3
    drunkenneo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    199
    Card|Orid|name|amt|telno
    123 12 aa 20 123
    124 12 aa 20 123
    125 12 aa 20 123
    126 12 aa 20 123
    134 12 aa 20 123
    125 12 aa 20 123
    127 12 aa 20 123

    This is a simple case i am taking where i need to display like
    Card|Orid|name|amt|telno
    123 12 aa 20 123
    124 12 aa 20 123
    125 12 aa 20 123
    126 12 aa 20 123
    134 12 aa 20 123
    125 12 aa 20 123
    127 12 aA 20 123
    After 6th entry the name should change..... did you got my pt...

  4. #4
    Dal Jeanis is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    Not really, but that's because you haven't answered the other questions - what is the purpose of the form, and why do lines 7+ need to be different from the 1-6?.

    I have no clue what the significance is of the number 6, or anything. Without knowing that, we have no way to give you any useful advice.

    What makes you think there should be 6 records for the first person? Should there be 6 records for each person, or does the form only show the first 6 for each, or are the first 6 records of a different type than the others, or what?

    Talk about what you are trying to achieve. What's the business usage? That will allow me to fill in the details that you are leaving out.

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Do you want a form object for data entry or do you want a 'form' as in a printed document?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    drunkenneo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    199
    in preview and printing

  7. #7
    drunkenneo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    199
    Quote Originally Posted by Dal Jeanis View Post
    Not really, but that's because you haven't answered the other questions - what is the purpose of the form, and why do lines 7+ need to be different from the 1-6?.

    I have no clue what the significance is of the number 6, or anything. Without knowing that, we have no way to give you any useful advice.

    What makes you think there should be 6 records for the first person? Should there be 6 records for each person, or does the form only show the first 6 for each, or are the first 6 records of a different type than the others, or what?

    Talk about what you are trying to achieve. What's the business usage? That will allow me to fill in the details that you are leaving out.
    t\here i want to achieve is the amt should not exceed 600, else offer get change, due to which i need to separate the name, i feel that solve the most of the queries you have

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Quote Originally Posted by drunkenneo View Post
    in preview and printing
    So do you really want a report output?

    Quote Originally Posted by drunkenneo View Post
    t\here i want to achieve is the amt should not exceed 600, else offer get change, due to which i need to separate the name, i feel that solve the most of the queries you have
    That statement makes no sense to me.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    drunkenneo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    199
    iam trying to think every possible output, if you have a idea, please provide, it will be added to my knowledge

  10. #10
    Dal Jeanis is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    I think we're dealing with a language barrier here.

    We are trying to get you to describe the application, in such a way that we can understand your goal, and provide useful advice on how to get it. Please give us the big picture. What is the purpose of the database? What is the business purpose of the report? what are you going to use it for?

    I notice you have card and orid, name, amount and telephone number. So, perhaps this is a database of credit card numbers, credit card originators, name on credit card, amount that has been authorized for a periodic payment, and confirmation telephone number?

    When you say, "the amount should not exceed $600, or else [the offer will get changed]", is this an individual amount, or a cumulative amount? So you want the report to change when the sum exceeds $600, rather than when there are more than 6 transactions?

    We really can't independently determine all the things you are leaving out. We need to understand the application, its purpose, the structure of the underlying data, what you are doing with the report, and so on, if we are to give you a detailed suggestion of how to get what you want.

  11. #11
    drunkenneo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    199
    perhaps, you got what i am doing

    the queries you have is cumulative amt on which offer will change

    i have a payment log table from the master data, where if the customer have paid then the payment log will be getting generated based on the paid
    from payment log above requirements is needed.

    I feel that much is pretty simple to understand.

    just i need is from my table [above mentioned] i will be having many entries for same person, and if the amt excel 600 then the same persons name should be displayed in different format i.e initial of Fname and lastname

    as a new programmer i dont understand why you need to know the underlying tables, when i need everything from this table only.

  12. #12
    Dal Jeanis is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    Well, so far I've spent about 90 minutes trying to understand your application, and if you had just started out by answering the questions I had asked, it would have taken me about three minutes. You are making us guess what you're trying to achieve, which is inefficient, to say the least. I guessed correctly because I am very good at my job, but that does not mean I did not need the information I was asking for.

    I still don't have enough information to help you.

    You are now telling me the display of the name needs to change based on the cumulative dollar amount. You started out asking for it to change based on the number of transactions.

    What you really need, though, doesn't seem to have anything to do with the display of the name. It seems like you need to know which transactions occur after the customer has charged $600.00.

    Here's the problem: none of the fields that you showed me will tell you what order the transactions actually occurred in. You need to have a date for that.

    And, to create a number that calculates the cumulative amount charged, transaction order needs to be discoverable. Your request is actually a fairly complicated one, since the calculating the cumulative amount requires a subquery against the same table, for every transaction that occurred before the current transaction.

    SO, I'd suggest that you google "MS Access cumulative totals" and review five or ten pages that explain the ways that you can get what you need. Then, when you have a specific question, come back here and ask it.

    Start with Ken Sheridan's answer here http://answers.microsoft.com/en-us/o...9-0367d87e19ac

    Then this discussion here:
    http://www.utteraccess.com/forum/cum...-t1380304.html

    Then read four or five more.

  13. #13
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Here's another reference on subqueries http://allenbrowne.com/subquery-01.html#YTD
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Reference recordset of different form
    By tylerg11 in forum Forms
    Replies: 3
    Last Post: 07-09-2013, 10:35 AM
  2. Returning a recordset for a form
    By Newby in forum Access
    Replies: 6
    Last Post: 02-28-2013, 09:59 AM
  3. Replies: 2
    Last Post: 03-08-2012, 12:59 PM
  4. form controls & recordset
    By slow&steady in forum Forms
    Replies: 2
    Last Post: 06-25-2010, 02:49 PM
  5. Replies: 1
    Last Post: 11-13-2009, 03:03 AM

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