Results 1 to 8 of 8
  1. #1
    Ayiramala is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Dec 2014
    Location
    Kerala, India
    Posts
    74

    create a serial number in one field based on value entered in another

    Hi,


    On a form I have a subform 'frmStudentEntrySubform' in which 'CourseOrder' is a number field, and 'CourseName' which is a text field(I have added a combo box here). For each student I enter '1' in CourseOrder and select a course from the combo. Then '2' in CourseOrder, the next course, and so on. i wonder if there is a way to eliminate the need to enter the order numbers? My idea is, '1' should be there in the first row, and when we select the first course, '2' should come in the next row, and so on. A bit of code in the AfterUpdate event of the combobox, perhaps?

    These numbers are actually stored in a table, as the order is necessary later.
    I would greatly appreciate it if anyone can help. Thanks.

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Please tell us more about
    as the order is necessary later.

  3. #3
    Ayiramala is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Dec 2014
    Location
    Kerala, India
    Posts
    74
    Only this: I need to know who opted for which course first, as there will be separate rank lists for each course. If two give the same course as their first option, the one with higher marks will get priority (all these marks are already entered in the database).

  4. #4
    orange's Avatar
    orange is online now Moderator
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    So, the "serial number" is really more of a Student Course preference sort of concept??? If so, I think your data entry/collection mechanism would highlight that the order in which you list your course is critical to the "system", or collect the ranking with the entry at input.
    It appears that this is a key point of your selection system, so you have to communicate to the user in some manner.

    Even if you stored the collected data in a list box during data entry, I think you'd have to advise user that the order in which the course are submitted should represent your preference ranking ( or whatever words make sense to your context).

    Good luck.

  5. #5
    Ayiramala is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Dec 2014
    Location
    Kerala, India
    Posts
    74
    Yes, this serial number is very important, but this database in not meant for distribution - I mean, I am the only one doing the data entry. I have asked for a method to automate the numbering only for my convenience.

    Is there a way to do this?

  6. #6
    orange's Avatar
    orange is online now Moderator
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    I suggest you include StudentID, CourseID and StudentPreferenceRank in the data entry.
    These could all be in different comboboxes. Just selecting the appropriate values and click a button to add records to your table.
    I would have the rank stored explicitly (separate field).

    Good luck.

  7. #7
    Ayiramala is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Dec 2014
    Location
    Kerala, India
    Posts
    74
    Thanks. I will do as suggested.

    I would have the rank stored explicitly (separate field).
    Yes. I have done this.

  8. #8
    orange's Avatar
    orange is online now Moderator
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Rank seems critical, that is the rationale for the separate field.
    Good luck with your project.

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

Similar Threads

  1. Replies: 5
    Last Post: 03-15-2016, 11:49 AM
  2. Replies: 1
    Last Post: 04-21-2014, 02:28 PM
  3. Replies: 6
    Last Post: 01-24-2013, 10:02 PM
  4. Replies: 2
    Last Post: 08-15-2012, 02:21 AM
  5. Replies: 4
    Last Post: 07-27-2011, 12:42 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