Page 2 of 2 FirstFirst 12
Results 16 to 24 of 24
  1. #16
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Now looking at db from first post. The form does not have a control bound to Validity field. Validity field is text, not date, type.

    The UPDATE works for me with my edits. Provide new db with your attempted code.
    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.

  2. #17
    christoh is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2015
    Posts
    12
    Access labels.zip

    I somewhat messed up this database trying to delete confidential info etc. Originally the table was linked so I created a local table and changed some of the entries, but for some reason I also changed the way the form acts-normally when I scanned in the combobox it changed the rest of the form to reflect the info, which it does not do anymore...

  3. #18
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    There is no code associated with the combobox that will find record. I suppose you replaced it with my suggested code. Also, the combobox RowSource does not include the Barcode field, only SIID field. What is SIID for? Why does every record show the same barcode?

    There is no control bound to Validity field. Are users supposed to enter value in Validity?

    I am very confused. Describe again, step-by-step, exactly what process you want to accomplish.
    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.

  4. #19
    christoh is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2015
    Posts
    12
    June7

    My apologies thru trying to change the code and my tables to reflect test data I must have really screwed up my database. I started from scratch without any of you codes at this moment. Here is that database access test.zip.

    The steps I envision:

    1. Scan a barcode (SIID) from an item into the combobox which uses the table to populate the form.
    2. But before it populates the form check for data (Date/time) in "Validity" column. If data exist then pop up message box stating that "GE has been processed" giving me two choices- Cancel, or Overwrite.
    3. So if no error is triggered then I would like to use one of the toggle buttons "Print 1" Print 2" and then the print button, that would print the current record either 1 copy or 2 copies depending on the toggle button.
    4. After using the print button I would like access to autofill the column "Validity" with the date/time for all matching data in the table under the "GE" column. So if I scan a different SIID with the same data in "GE" column it would pop up the previous discussed message box. An example of this is "ID" 1 and 5. Different SIID's but same GE.
    5. Clear combobox for next scan.


    Hope this makes sense let me know if you need a better explanation.

    Thanks again
    Attached Files Attached Files

  5. #20
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    I don't use macros. Either change the combobox embedded macro to VBA code or modify AfterUpdate macro to include equivalent of suggested VBA code. Macros can run saved query objects. https://msdn.microsoft.com/en-us/lib.../ff195094.aspx

    Forms are not intended for printing although they can be. Reports are not intended for screen viewing but can serve. Printing form or report requires the recordset to be filtered to desired record(s) else all records will output. Best would be to open report filtered to desired record(s).

    Again, there is no control for Validity field. Are users supposed to input a date?
    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.

  6. #21
    christoh is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2015
    Posts
    12
    June7,

    I am not sure you understand that most of this is way above my head. I have no idea how to do any of what you mentioned. And as mentioned in step 4 in my previous post that I would like Access to input the date in Validity.

  7. #22
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Okay, users are not supposed to view or enter date into Validity field.

    You did not address my comment that the Validity field is text type, not date/time type.

    Exactly what do you not understand about creating macro or VBA code? I already suggested VBA code for populating the field.
    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.

  8. #23
    christoh is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2015
    Posts
    12
    That is correct there is no need for users to view the date unless they go to the table.

    For the Validity field type it does not matter for me, I tried to set it to date/time type under the design view for the table it must have not stuck.

    What is the difference between VBA and a macro aren't they the same like in Excel? How and where do I enter VBA code? What is an embedded procedure? BC that is what I have in the combobox at the moment to SearchForRecord.

  9. #24
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Users should not interact with tables and queries - only forms and reports.

    Macros and VBA are very different in Access. Your event currently has an [Embedded Macro] as code.

    For VBA, select [Event Procedure] in the event property then click the ellipsis (...) to open VBA editor, type code.
    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.

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

Similar Threads

  1. Date Format Different in same column
    By drunkenneo in forum Access
    Replies: 2
    Last Post: 01-20-2014, 01:55 PM
  2. date amd text as same column
    By drunkenneo in forum Access
    Replies: 1
    Last Post: 12-08-2013, 10:16 AM
  3. Date Difference from same column
    By akmehsanulhaque in forum Queries
    Replies: 1
    Last Post: 02-19-2013, 01:31 PM
  4. Replies: 3
    Last Post: 09-19-2012, 08:59 AM
  5. Replies: 1
    Last Post: 04-15-2010, 02:07 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