Page 1 of 3 123 LastLast
Results 1 to 15 of 36
  1. #1
    parishpete is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    24

    Dropdown list drops in the wrong place

    I've created two dropdown lists on a form populated from two tables.



    The left hand list drops down to the right of its combo box and the right hand list drops down to the left of its combo box. Both list dropdowns are wider than they need to be.

    Is there any way of moving and resizing them so the ydrop directly beneath their respective combo boxes?

    second question: the form allows input of a date, a surname from one list and a book title from a second list. The three elements form a record and my 'Next' button uses RecordsGoToNew to enter a new record clearing the three boxes. I want to add another button so that the same date and surname remain but a second title can be input to create another record?

    I'm sure there is a simple way, it just eludes me.

    any help welcome, Thanks. Pete

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    The "List Width" property on the Format tab of the property sheet controls the width when in drop down.

  3. #3
    parishpete is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    24
    Quote Originally Posted by RuralGuy View Post
    The "List Width" property on the Format tab of the property sheet controls the width when in drop down.
    Thank you RuralGuy.

    I have the list width sorted but the list still drops down off to one side of the combo box rather than directly underneath. I can't see a property to alter this.

    Is there one?

    Thanks

    Pete

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I don't believe so. It is probably trying to not cover up something that "Access" feels is important. If you move the control, does that anomoly change?

  5. #5
    parishpete is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    24
    Quote Originally Posted by RuralGuy View Post
    I don't believe so. It is probably trying to not cover up something that "Access" feels is important. If you move the control, does that anomoly change?
    Thank you again. The list was 3 lines to long display below the box. I had a reshuffle and it's in the right place now.

    Regards and thanks

    Pete

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Sounds like you're good to go. Are you ready to use the Thread Tools at the top of the thread and mark this thread as Solved?

  7. #7
    parishpete is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    24
    Quote Originally Posted by RuralGuy View Post
    Sounds like you're good to go. Are you ready to use the Thread Tools at the top of the thread and mark this thread as Solved?
    Nearly,

    Just need guidance on the second question in my original post, although I only need to carry the completed name field forward to the next record entry as I've solved the date entry.

    regards

    Pete

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Have you considered using the Default Value? http://access.mvps.org/access/forms/frm0012.htm

  9. #9
    parishpete is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    24
    Quote Originally Posted by RuralGuy View Post
    Have you considered using the Default Value? http://access.mvps.org/access/forms/frm0012.htm
    I'll give a try in the morning though I only need to carry it forward once to the next record sometimes. The essence of the database is one person can loan 1 or 2 books at a time so the name of the borrower only carries forward if there two books borrowed

    regards and thanks

    Pete

  10. #10
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Since it is a default, it can easily be overwritten by the user. If you wanted, you could put the code behind you "new" button.

  11. #11
    parishpete is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    24
    Quote Originally Posted by RuralGuy View Post
    Since it is a default, it can easily be overwritten by the user. If you wanted, you could put the code behind you "new" button.
    Thanks for your help. I'm afraid I spent the morning without success. I tried inserting the field name as shown below and with a button, saving the record and running the code before New Record but the field in the combo box remains blank.

    const cQuote="""" 'Thats two quotes me![Loaned to].DefaultValue = cQuote & me!Loaned to.Value & cQuote

    Loaned to is just a number

    Thank you for trying but It's a lot years since I was last under the hood of a database!

    regards

    Pete

  12. #12
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Copy and Paste the entire procedure you have been trying to use, please.

  13. #13
    parishpete is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    24
    Quote Originally Posted by RuralGuy View Post
    Copy and Paste the entire procedure you have been tring to use, please.
    I'm sorry but I deleted all the code I was using earlier.

    In essence the the input on the form is simple and straight forward I think I'm just having a dumb day!

    There are 3 elements to each record; a person's number held in one table, a book number held in another table, and a date. The three elements are stored in a third table as a loan record. Date can be ignored, any entries are only made once per month and the 'save' button uses Date() to put today in.

    the two numbers are selected from the two drop down lists on the form from the 2 tables. Having selected the numbers the 'save' button puts in the date, saves the record, runs your code as I described in the last post, and then goes to new record.

    What I had hoped is the combo box for person would show the last number entered and the book box be empty. But it was not to be!

    The field that holds the number I want to carry forward is called [Loaned to]

    Best I can give I'm afraid

    Many thanks for your paitience and guidance

    Pete

  14. #14
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    So the "Save" button no longer has any code in its Click event?

  15. #15
    parishpete is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    24
    Quote Originally Posted by RuralGuy View Post
    So the "Save" button no longer has any code in its Click event?
    All it has now is:

    RunMacro (to put in today's date)
    and
    RunMenuCommand 'SaveRecord'

    A second button handles New record

    regards

    Pete
    Last edited by parishpete; 11-01-2012 at 09:10 AM. Reason: missed a sentance out

Page 1 of 3 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Dropdown list
    By imintrouble in forum Access
    Replies: 2
    Last Post: 01-20-2012, 08:09 AM
  2. Dropdown list
    By stratack in forum Access
    Replies: 1
    Last Post: 07-25-2011, 06:58 AM
  3. Dropdown List: Use Each Item Once?
    By Heavy Doody in forum Access
    Replies: 1
    Last Post: 05-02-2011, 07:44 AM
  4. Set up a dropdown List
    By asherbear in forum Access
    Replies: 2
    Last Post: 06-24-2010, 06:45 AM
  5. Dropdown list in a query
    By asherbear in forum Queries
    Replies: 6
    Last Post: 05-31-2010, 06:38 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