Page 1 of 2 12 LastLast
Results 1 to 15 of 27
  1. #1
    prithwisaha is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    May 2018
    Posts
    25

    Fetch multiple data in a text box in access vba


    I have a table with 5 parameters. I want to show all the 5 parameters data in a text box when click on check data button in the access form. Whenever data is saved via form in a table the last datas will be shown in the text box when check button will be clicked. How?? Please help.

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,845
    to clarify what you require please supply some example data and the result required from that example data

  3. #3
    prithwisaha is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    May 2018
    Posts
    25
    Please check the table
    Click image for larger version. 

Name:	tab.JPG 
Views:	39 
Size:	19.2 KB 
ID:	33858
    I want all the data from rows to be fetched in a text box when i click on check sms button in an access form:
    Click image for larger version. 

Name:	Form.JPG 
Views:	39 
Size:	42.8 KB 
ID:	33859

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,644
    I don't understand what you want. The image does not show what you want the result to be. Give us a mock-up or a better explanation.

    Why do the textboxes not show the same values of the record in the table?
    Last edited by June7; 05-05-2018 at 01:14 AM.
    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.

  5. #5
    prithwisaha is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    May 2018
    Posts
    25
    I am sending the database with form.
    Please check the codes in vba. When i click on save the data in text boxes will be saved in the table. My requirement is that all the data that will be saved when i click on checksms button it will be shown in the right hand side text box. After that what i will do is i will send the contents of the text box through sms by clicking sendsms button which is pending not yet done.CHECK DATA.zip

  6. #6
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,706
    Please check the codes in vba. When i click on save the data in text boxes will be saved in the table
    Above is working. However, each time you click, a copy of the record will be saved resulting in duplicates.

    My requirement is that all the data that will be saved when i click on checksms button it will be shown in the right hand side text box.
    So this button saves the record to the table same as the Save Table button? Don't see point of displaying the data in the right textbox. Why not just process the data shown in the individual textboxes?


    Perhaps you could explain the purpose of your database so that we could better understand the requirements to be resolved.

  7. #7
    prithwisaha is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    May 2018
    Posts
    25
    The user will check the data in the text box as entered in the database. after that there will be send sms button in which when clicked the data that is shown in the text box will be send to selected users.

    steps are :
    open form
    insert data in db using save button
    check the current same saved data in the text box
    click on send sms button to send the data as seen in the text box as mobile sms over gateway to selected users.

  8. #8
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,706
    Still don't see the point of showing same data in the right textbox unless maybe you want to show more than one record. Is that the case?
    What should the right textbox look like when filled with the data - how would you like it formatted?

  9. #9
    prithwisaha is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    May 2018
    Posts
    25
    I need the form as it is with the textbox. The textbox will let the users check the current data that is entered in the table and after checking the same content will be send via sms when they will click on the send sms button.

  10. #10
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,706
    See post #8. You have not provided the information.
    How-do-you-want-the-right-textbox-to-look-when-it-is-filled-with-the-data?
    I can't help you without this information.
    Please show an exact sample.

  11. #11
    prithwisaha is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    May 2018
    Posts
    25
    please check the attached file:
    Attached Thumbnails Attached Thumbnails View.jpg  

  12. #12
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,644
    Really serves no purpose to repeat the data in the single textbox. However, if you must, an expression in textbox ControlSource:

    =[Entry_Date] & Chr(13) & Chr(10) & [Shift] & Chr(13) & Chr(10) & [Status] & Chr(13) & Chr(10) & [Size_Dn] & Chr(13) & Chr(10) & [Gauge_Dia] & Chr(13) & Chr(10) & [Load] & Chr(13) & Chr(10) & [Hardness] & Chr(13) & Chr(10) & [Time]


    Data is committed to table when: 1) close table/query/form or 2) move to new record or 3) run code to save.

    Form and controls are bound to table and fields, the VBA code to save data is unnecessary and, as davegri pointed out, creates duplicate record. Change the code to simply:

    DoCmd.RunCommand acCmdSaveRecord

    or

    DoCmd.GoToRecord , , acNewRec


    You have code for sending via SMS? As far as I can tell, this is very difficult.
    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.

  13. #13
    prithwisaha is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    May 2018
    Posts
    25
    Thanks a lot. will get back to you with the updated database. can u give your cell number so that i can msg you from the app.

  14. #14
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,644
    No, cannot have my number. You will have to message yourself.
    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.

  15. #15
    prithwisaha is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    May 2018
    Posts
    25
    OK. i AM GETTING THE SMS, But on a single line. i need to show the data in the text box with the headers also.

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

Similar Threads

  1. Fetch data from website
    By Virgule in forum Macros
    Replies: 2
    Last Post: 03-30-2015, 01:43 PM
  2. Using DLOOKUP to fetch data from table
    By rd.prasanna in forum Access
    Replies: 4
    Last Post: 10-29-2013, 11:23 AM
  3. Replies: 3
    Last Post: 01-17-2012, 01:04 PM
  4. Fetch Data From MS-Access
    By kashif.special2005 in forum Programming
    Replies: 1
    Last Post: 08-27-2011, 05:50 AM
  5. Replies: 6
    Last Post: 04-18-2010, 03:41 AM

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