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.
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.
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...
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.
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
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.
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.
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.
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.
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.