Results 1 to 13 of 13

Thread: table (2k)

  1. #1
    2 Star Lounger
    Join Date
    Nov 2002
    Posts
    160
    Thanks
    0
    Thanked 0 Times in 0 Posts

    table (2k)

    hello all ,
    i have one table contain one feald has about 540 record it is name of employers , i want to divided them like that the first 10 names in a teble and the second 10 names in anoter table till it finshed .
    thanks
    Ashraf

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: table (2k)

    Why would you do that? It doesn't make any sense from a database design viewpoint, so you must be trying to accomplish something specific. And are you trying to divide one table into two, or one table into 50+? If you can explain exactly what you're trying to accomplish someone should be able to help you.
    Charlotte

  3. #3
    2 Star Lounger
    Join Date
    Nov 2002
    Posts
    160
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: table (2k)

    hi Charlotte
    thanks 4 ur replay . supose that i have that table contain names of student , and some buses , i want to put evry 10 names in a bus school . i hope u understame me .
    Ashraf

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: table (2k)

    You wouldn't do it quite like that. You would normally have a table for students, a table for buses, and a table with a studentID and a busID in it, which would assign the students to a bus. Is there any criteria for which students get assigned to a particular bus? Does a bus make multiple trips, each with 10 students, or what?
    Charlotte

  5. #5
    2 Star Lounger
    Join Date
    Nov 2002
    Posts
    160
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: table (2k)

    i try to explan moer .
    if i have a table contain feald names about 470 person . i want to divided that table to many tables evry one contain 10 names only . i hope to find any idean for it .
    Ashraf

  6. #6
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: table (2k)

    Hi Ashraf,

    See the attachment to get an idea of what Charlotte is telling you. Have a look at the table design, and the relationships in the relationship window!
    Then have a look at the query which allows you to view which student travels in which bus!

    If you are simply after dividing a long table of students into multiple tables of 10 records ( a very strange and contradictory request), then you will need to use a macro that will run a make table query that counts 10 records and moves it to a new table!

    Hope this gives you some direction!
    Regards,
    Rudi

  7. #7
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: table (2k)

    I understand what you want to do, but it doesn't make sense to do it that way. If that's what you want to do, you might as well use Excel and break the names up into spreadsheets. If you want a method that will allow you to *maintain* the data, then follow the approach I suggested. If you just want to do this once and then forget about it, Excel would make more sense.
    Charlotte

  8. #8
    2 Star Lounger
    Join Date
    Nov 2002
    Posts
    160
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: table (2k)

    it is near about what i want , but i have another idea , can i see a 10 names only in a page in report .
    if i can write the code to do it .
    thanks .
    Ashraf - egyption

  9. #9
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: table (2k)

    In the detail section of the report, create an unbound textbox. Name it Counter.
    In the Control Source enter =1 (with the equal sign)
    Set the Running Sum property to Over All
    At the bottom of the detail section create a Page Break Control. Name it PageBreak01.
    In the On Format event of the detail section enter the following code :
    <pre>If Int(Me.Counter / 10) = Me.Counter / 10 Then
    Me.PageBreak01.Visible = True
    Else
    Me.PageBreak01.Visible = False
    End If</pre>

    Francois

  10. #10
    2 Star Lounger
    Join Date
    Nov 2002
    Posts
    160
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: table (2k)

    Thank u dear , we in egypt say The Big always big .
    Ashraf

  11. #11
    2 Star Lounger
    Join Date
    Nov 2002
    Posts
    160
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: table (2k)

    Hello again dear Francois ;
    ur code is working very good but i have another idea that the user want to put a number for examble 15 that 15 = 15 line in the page or 8 ( 8=line in the page ) .
    Ashraf

  12. #12
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: table (2k)

    You could use a form, say frmSetting, with a text box txtLines. The user enters the number of lines per page for the report in this text box. The form also contains a command button to open the report.

    The code could be modified like this:

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Me.PageBreak01.Visible = (Me.Counter Mod Forms!frmSetting!txtLines = 0)
    End Sub

    where Counter is the text box described by Francois.

  13. #13
    2 Star Lounger
    Join Date
    Nov 2002
    Posts
    160
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: table (2k)

    VERY GOOD
    many thanks of all the grouo of Moderator
    Ashraf

Posting Permissions

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