Page 1 of 3 123 LastLast
Results 1 to 15 of 39
  1. #1
    ashu.doc is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2012
    Posts
    124

    Adding result box next to drop down menu

    Hello everyone
    I am a newbie for access, I am trying to add a result box which will contain number chosen from a dropdown menu, so it will be something which look like this:


    LABEL ''drop down menu'' '' result box''

    In the drop down menu there will be different criterias (text) and each criteria will have specific number. What I want to do is when the user select one of the criteria (which will be in the form of text), the number assigned to that criteria comes into the result box next to it. Sorry for being so demanding I don't know how can I assign number to those criterias.

    Many Thanks
    Ash

  2. #2
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    Welcome to the forum!

    Is the drop down menu based on a table or are you supplying the values through a value list? I would recommend putting the various criteria as records in a table and use the autonumber field in that table to assign a unique number to each criteria. Then base your dropdown on that table. Include the autonumber field as well as the text field in the dropdown. Access will automatically use the autonumber field as the bound field of the dropdown. If you want to show that ID value in another textbox you can use an expression to reference it. That expression would be =comboboxname.column(0) (assuming that the ID field is the first field in the combo box's row source;Access starts counting at 0 not 1).

  3. #3
    ashu.doc is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2012
    Posts
    124

    hi

    Quote Originally Posted by jzwp11 View Post
    Welcome to the forum!

    Is the drop down menu based on a table or are you supplying the values through a value list? I would recommend putting the various criteria as records in a table and use the autonumber field in that table to assign a unique number to each criteria. Then base your dropdown on that table. Include the autonumber field as well as the text field in the dropdown. Access will automatically use the autonumber field as the bound field of the dropdown. If you want to show that ID value in another textbox you can use an expression to reference it. That expression would be =comboboxname.column(0) (assuming that the ID field is the first field in the combo box's row source;Access starts counting at 0 not 1).

    hi there
    its working perfectly
    cheers

  4. #4
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    You're welcome.

  5. #5
    ashu.doc is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2012
    Posts
    124
    Another quick one - if I am trying to show the sum value of the different text boxes which I have created with expression builder with this expression -

    total = [1]+[2]+[4]

    its showing the value 124 rather than 7 ??

  6. #6
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    Access is interpreting the value as a string/text. Make sure to set the format of the textboxes to a number (general number or fixed etc.). If you still have an issue you could force the value to be a number using the applicable conversion function such as cLng([textbox1name])+cLng([textbox2name])+...

  7. #7
    ashu.doc is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2012
    Posts
    124
    Quote Originally Posted by jzwp11 View Post
    Access is interpreting the value as a string/text. Make sure to set the format of the textboxes to a number (general number or fixed etc.). If you still have an issue you could force the value to be a number using the applicable conversion function such as cLng([textbox1name])+cLng([textbox2name])+...
    you are a champ
    thanks

  8. #8
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    You're welcome; glad it worked out for you.

  9. #9
    ashu.doc is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2012
    Posts
    124
    Quote Originally Posted by jzwp11 View Post
    You're welcome; glad it worked out for you.

    Hi there
    There is a little glitch, I have calculated the final value of my formula which I was using in a form, but what I want is actually is to save this value which comes after calculation from this formula to be saved in database. The value is called mortality rate which is coming in a text box, since I have already given a formula (1/(1+e(-x))) for "control source" to this box, I am not able to save it in a table.

  10. #10
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    In general, calculated values are not stored in a database but rather calculated on the fly when you need them in forms, queries or reports. You would only store the raw values needed to do the calculation.

  11. #11
    ashu.doc is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2012
    Posts
    124
    Quote Originally Posted by jzwp11 View Post
    In general, calculated values are not stored in a database but rather calculated on the fly when you need them in forms, queries or reports. You would only store the raw values needed to do the calculation.
    ok, so clearly what I can do is calculate the value in another page and write the values manually in the main form if i want to save them.
    Thanks

  12. #12
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    You should not save the calculated value. What would happen if one of the values used in the calculation changes? Your value that you manually entered would no longer be correct. It is best to calculated the value when you need it. In a main form you can reference a query that calculates the value via a Dlookup() function

  13. #13
    ashu.doc is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2012
    Posts
    124
    Quote Originally Posted by jzwp11 View Post
    You should not save the calculated value. What would happen if one of the values used in the calculation changes? Your value that you manually entered would no longer be correct. It is best to calculated the value when you need it. In a main form you can reference a query that calculates the value via a Dlookup() function
    Hi again
    I have a major issue with my database(which is actually a surgical logbook). First I created tables - personal details(doctor's details who is using the logbook), patient details, and operation details. And after that I created forms corresponding to tables. I have taken hospital ID of patient as primary key, which I have put in all tables as separate field. What I dont understand is if the user enter the data in these three forms for one patient ID, how is it possible that one set of data gets created itself under one hospital ID with all these different forms.
    Basically I am asking that how to interconnect all three forms and all three tables together as one set for one patient ID.

    Thanks in advance

  14. #14
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    Can you post your relationship diagram so that I can see how you created your relationships?

  15. #15
    ashu.doc is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2012
    Posts
    124
    Click image for larger version. 

Name:	untitled.jpg 
Views:	20 
Size:	72.0 KB 
ID:	8697
    hi this is the relationship

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

Similar Threads

  1. Drop down menu help
    By whojstall11 in forum Access
    Replies: 6
    Last Post: 03-07-2012, 01:51 PM
  2. Create Dynamic Drop Down Menu
    By jmfranqui in forum Access
    Replies: 1
    Last Post: 02-02-2012, 12:11 AM
  3. Replies: 3
    Last Post: 11-29-2011, 07:01 AM
  4. Select Drop down menu in Report
    By desiree in forum Reports
    Replies: 5
    Last Post: 09-06-2011, 09:51 AM
  5. Drop Down Menu Parameters
    By spoonman in forum Programming
    Replies: 5
    Last Post: 08-18-2011, 02:16 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