Results 1 to 4 of 4
  1. #1
    rrasch is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Nov 2011
    Location
    Montreal
    Posts
    2

    How do I update my combo box

    We have a small computer room with 4 computers.
    An attendant logs-in and out people. I wrote
    the database that anyone of a 110 people using
    the room could be the attendant. We've been using
    this program since November 11, 2011. It’s working
    fine and is very user friendly.

    On the First tab it has 2 buttons(for each computer)
    to activate a countdown timer for (1hr). One drop-
    down combobox showing room# and name. The second


    combobox is for usage-description (google, email,
    resume, games... etc)

    The Second Tab shows a datasheet of the stuff
    we used to write on paper. { Timein-Timeout, Room#,
    name,shift. Guy on duty....} Everything seemed fine.

    But I've come to realize that if someone new moves-in...
    I'm Screwed!

    (my program's table structure is right) but I can't figure
    out; how to make only the (new guys name) with the
    room number.... Showup in my combo box.
    as new guestnames are created the combobox must be update
    with new names assigned to room.

    As part of my code I've got... Form_Rooms Listed in ComboBox

    Private Sub Room406()
    ' I made a 110 subs like this one which is called from another sub
    ' rooms are numbered disorderedly.....
    Me!Labe1Room406.Caption = DLookup("RoomNumber", "Guests", "[myIndex]=" & 37)
    theLastDate = DLookup("LastDate", "Guests", "[myIndex]=" & 37)
    Me!FirstName406.Caption = Forms!Tab!Main.Form!RoomCombo01.Column(1, 37)
    'myActivationDate=30days is public
    If (myActivationDate < DateDiff("d", theLastDate, Now())) Then
    Forms![Rooms_Listed_in Combo-Box]![Labe1Room406].ForeColor = colorRed1
    Forms![Rooms_Listed_in Combo-Box]![Labe1FirstName406].ForeColor = colorRed1
    Else
    Forms![Rooms_Listed_in Combo-Box]![Labe1Room406].ForeColor = colorBlue2
    Forms![Rooms_Listed_in Combo-Box]![Labe1FirstName406].ForeColor = colorBlue2
    End If
    End Sub

    Guest **** GuestName ****Check_in
    -------- **** ----------- **** ----------
    GuestID **** GuestNameID **** CheckIn_ID
    RoomNumber **** FirstName **** GuestNameId
    ResPassword **** Initials ****CheckinDateTime
    myIndex **** GuestID ****CheckoutDateTime
    LastDate **** Computer# **** UsageDescription

    Combobox Rowsource setting
    SELECT [Room ComboBox Query].RoomNumber, [Room ComboBox Query].FirstName, [Room ComboBox Query].GuestID, [Room ComboBox Query].GuestNameID FROM [Room ComboBox Query] ORDER BY [RoomNumber], [FirstName];
    is there an easy way to adjust the setting?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Not following, can you provide project for analysis? Copy, remove confidential data, run Compact & Repair, zip if large, attach to post.
    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.

  3. #3
    rrasch is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Nov 2011
    Location
    Montreal
    Posts
    2
    thanks for writing june.... my program is 1.4 mbs

    I have the mdb on my yahoo Zumbodrive but I think it has to be a mailed link

    http://www.zumodrive.com/share/f1RMMjIxNz

    I found a work around solution; but it creates a problem if it's not used accurately...

    I would still rather have a select distinct working than what I' made now.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    If you still need something fixed I need more info. What is the process that is giving you an issue? If you add a new guest while the Computer Room form is open, need to requery all the guestname comboboxes.

    What is the work around solution? You want a 'select distinct' instead of what? What code should I look at?
    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. Update Value in Combo Box
    By j2curtis64 in forum Forms
    Replies: 18
    Last Post: 05-13-2011, 04:37 PM
  2. Combo Box Update Form
    By k9drh in forum Forms
    Replies: 3
    Last Post: 05-04-2011, 04:34 AM
  3. Combo box with query and update
    By traction in forum Access
    Replies: 0
    Last Post: 11-24-2010, 02:38 PM
  4. Update form using combo box
    By rosh41 in forum Forms
    Replies: 1
    Last Post: 07-01-2010, 04:57 PM
  5. After Update for a second Combo box
    By nywi6100 in forum Forms
    Replies: 0
    Last Post: 10-23-2006, 03:07 PM

Tags for this Thread

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