Results 1 to 4 of 4
  1. #1
    cheyanne is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Location
    Valencia, Spain
    Posts
    91

    Problem with ComboBox

    I have inserted an unbound combo box into a form. I have done this many times before but have
    never expericenced this particular visual problem before.

    The combo box is 4 cm deep and, when used in form view, the items start just after the bottom of what is effectively an
    empty combo box area. It is as though the combo box itmes have appeneded themselves after the base line of the combo box.
    I have attached images of the problem I am experiencing.



    Image ComboBox shows part of the form in design view. You can see the size of the combo box
    and when in form view the details of the combo box start just under the yellow base line.

    Image Combo is a photograph showing the form in use and confirms the strange positioning of
    the item list when in use.

    When the form is in form view there is a verical scroll bar in the "empty" combo box. It is only after I have clicked
    on this scrollbar that the results show below the "empty" Combo Box. I also noted that the cursor is
    blinking at the top of the "empty" Combo Box, but I do have to click on the scrollbar to see any results.
    The vertical scrollbar is odd in that if I click it again the results disappear. It is almost likeit is an onClick scrollbar
    event. There is an AfterUpdate event, on the Combo Box, that finds and then show the selected record
    but I cannot see how that would cause this problem. (It is an embedded Macro)

    Has anyboby any idea of what has gone wrong.

    The idea of the combo box is to let the user select a particular record and have the current record change
    to the newly selected one. That works as intended but the visual representation of the combo box looks
    pretty naff currently.

    Any help would be greatly appreciated

    Cheyanne

    PS I decided to try using a list box instead of the combo box and it is working as intended. Still none the wiser as to
    why the combo box did work as intended.
    Attached Thumbnails Attached Thumbnails ComboBox.JPG   Combo.jpg  

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Combobox looks normal to me except it is too big. Comboboxes are intended to be only one line in height and then a dropdown presents items for selections.
    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
    cheyanne is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Location
    Valencia, Spain
    Posts
    91
    Hi June 7

    Sorry to use this method of contact but I have been in a long series of posts but sadly got nowhere.

    The problem is that I want to develop an appointments form (frmAppointments) and have deleloped two
    tables for this purpose namely tblAppointments and tblAppointmentTimes (I attach screenshots of there
    composition)


    I had two suggestions from contributors


    a. Use the DLookup to see if an appointment time has already been allocated


    b. Use this code which I understand would have populated my list box lstTimes with a diminishing list of available "unused" appointment times.

    The code was
    Private Sub txtAppointmentDate_AfterUpdate()

    Dim mySQL As String
    mySQL = "SELECT tblAppointmentTimes.ApptTimeID, tblAppointmentTimes.ApptTime FROM tblAppointmentTimes"
    mySQL = mySQL & " WHERE tblAppointmentTimes.ApptTimeID NOT IN (SELECT ApptTimeID FROM tblAppointments WHERE ApptTimeID is not null and AppointmentDate = #" & Me.txtAppointmentDate & "#)"

    Me.lstTimes.RowSource = mySQL

    End Sub

    Which method do you feel is better and if so can you assist me to get it to work?

    Regards

    Cheyanne
    Attached Thumbnails Attached Thumbnails Appointments2.JPG   Appointments1.JPG  

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    I have no opinion, either should work.

    What is the issue? Why isn't either working?

    You might want to examine existing databases designed for this purpose. One is the Events template from Microsoft. Other appointment type apps are available for no or low cost http://www.accesstogo.org.uk/Appointments_Planner.html
    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. Replies: 7
    Last Post: 04-18-2012, 11:38 AM
  2. Problem filling textboxes from combobox
    By reidn in forum Forms
    Replies: 1
    Last Post: 06-23-2011, 05:06 PM
  3. Sorting by combobox problem
    By wsurritte in forum Access
    Replies: 11
    Last Post: 02-28-2011, 02:11 PM
  4. Replies: 0
    Last Post: 08-24-2010, 06:38 PM
  5. Combobox problem
    By newitsupport in forum Access
    Replies: 1
    Last Post: 09-26-2009, 01:03 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