Results 1 to 11 of 11
  1. #1
    lamore48 is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Jan 2018
    Posts
    40

    Enter Data in a field and use message box to collect additional information

    Hi All,


    Attached is a simple database with one table and one form. The user enters box numbers and asks the user if the box is full.(in other words the box default to hold 8 tools) I want to ask the user to tell me if the box is missing any tools and if it is how many. When the user enters a number in the input box I want to then update that record(missing field). If the box is full just insert the box number and time and date. I got it to enter the box number, but when I added code to ask the user if the box is full....is where I have problems. I'm hoping someone can look at my code and tell me what I'm doing wrong.

    Thanks,
    Lenny
    Attached Files Attached Files

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    The input is put into the textbox, but since the textbox is unbound it isn't saved anywhere. Looks like you want to set the control source of the textbox to the missing field.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    lamore48 is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Jan 2018
    Posts
    40
    I tried what you said to do, I bound the control source to the [missing] field and gets an error that says "You can't go to the specified record". It works if you choose 'Yes", but if you choose no and enter a number in the Input box, it puts the value into the MyValue variable but it doesn't write it to the database and it gets that "You can't go to the specified record" error.

  4. #4
    lamore48 is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Jan 2018
    Posts
    40
    Correction, I just tried it answering "Yes" and I get the same error, I did not get the error prior to putting in the" Is the Box Full" If then statement.

    Thanks in advance for your help,
    Lenny

  5. #5
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    I don't know why you are doing it this way - if I were the user I would be very irritated with it asking me every time. And what if I made a mistake, said yes instead of no? Rather put these as textboxes on the form, let the user enter them when they enter the box number.

  6. #6
    lamore48 is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Jan 2018
    Posts
    40
    Because they are using a scanner, and part of the problem is they are neglecting to put in missing tools, so at the end of the day when they are in process to be sharpened, we find out we don't really have what we think we do. So this way will make them stop and enter a number.

  7. #7
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    By doing what pbaldy said in post # 2, this works for me.

  8. #8
    lamore48 is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Jan 2018
    Posts
    40
    I get an error when I do it.....can you re attach your database and I'll try it....thanks

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    You'll get an error with the GoToRecord line if you're on the first record. Why is it there, since the next line closes the form? The data will save without it if that was the goal.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  10. #10
    lamore48 is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Jan 2018
    Posts
    40
    Took it out and it works great....thanks for your help

  11. #11
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 09-01-2017, 10:28 AM
  2. Replies: 1
    Last Post: 10-31-2016, 05:00 AM
  3. Replies: 2
    Last Post: 03-13-2013, 06:13 PM
  4. Append additional information to a field
    By Lorlai in forum Access
    Replies: 6
    Last Post: 07-15-2011, 11:09 AM
  5. Replies: 1
    Last Post: 06-02-2011, 04:11 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