Is this popup box possible?

TigerGyrlAlly

New Member
Joined
Jun 11, 2003
Messages
18
I'm designing a form and the person that it is for has requested the following:

To be able to scan a code that will populate 4 fields, the code field, the name field, a number field, and a date field that is automatically populated with the current date at the time the scan is done.

To be able to scan the same code more than once and be prompted with a popup box that states the current date field and gives you the option of overwriting the existing entry with the new date. Pressing yes will overwrite the data and no will cancel the overwrite, close the popup and bring you to a new record where new data can be entered.

I am lost as to how or even if this task can be completed.

:rolleyes:
 
Pleas do think aloud. As I will state again, i'm new to using vba.

This was a request that someone had and they weren't sure of whether or not it could be done. And of course I wasn't sure which is why I asked.

Based on the way the rest of the project is setup, the data entered into the form goes into a temporary holding table. This message box was supposed to pop while a query was running to update the main table. That way the user has a choice of whether or not to do the update.

I took out that line of code, but the same error appears
 
Upvote 0

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Did you check your library references as I asked previously?

I'm thinking you don't even need to mess with the temp. table, it only creates an extra step and complicates matters, update the main table with this code as you go on the fly.
 
Upvote 0
Thank you for all of your help!!

I checked the references - there were none.

I understand what you are saying about not having the temp table and updating directly to the main table, but the temp table was created and utilized because that is the format the requestor wanted.

The temp table may get over 200+ entries in one day, but the update query may not be run everyday, which is why they wanted to have the temp table there - they could always reference it if they needed to make changes if mistakes were made, before running the query to update the main table using the information from the temp table and then clear the temp table of all data.

I didn't realize how complicated this message box would actually be - or as my topic states, if it was possible.
 
Upvote 0
TigerGyrlAlly said:
Thank you for all of your help!!
You are welcome. :)
I checked the references - there were none.
Sounds odd. Did you set the one the one that I mentioned? Substituting x for a number, e.g., 2.5?
I understand what you are saying about not having the temp table and updating directly to the main table, but the temp table was created and utilized because that is the format the requestor wanted.
I see this is as an unnecessary intermediate process that can be done away with, it convolutes your goal set, to update a table, might as well go with real-time processing. Do you disagree, other than what whom-ever asked you to do it a certain way? I think it's more reasonable to hit it at the moment (I imagine you're scanning or something...).
The temp table may get over 200+ entries in one day, but the update query may not be run everyday, which is why they wanted to have the temp table there - they could always reference it if they needed to make changes if mistakes were made, before running the query to update the main table using the information from the temp table and then clear the temp table of all data.
You can always make changes to your data in Access. Why not simply set up a query to review recent dates in the real table (versus the temp table approach)?
I didn't realize how complicated this message box would actually be - or as my topic states, if it was possible.
Not trying to be a jerk, but I've seen worse, I'm probably making it harder for you conceptually by trying to tell you to do something a little different... But it's doable. :)
 
Upvote 0
You can always make changes to your data in Access. Why not simply set up a query to review recent dates in the real table (versus the temp table approach)?

Yes I am scanning something, barcodes to be exact and producing them myself also. So the number that translates from the barcode is a field in my tables and the link between my barcode on paper and the information relating to that number. Because the codes are being scanned, they wanted the temp table setup as way to make sure the correct record will be modified - sometimes you may scan a code, but something else populates the field in the temp table.

Sounds odd. Did you set the one the one that I mentioned? Substituting x for a number, e.g., 2.5?

I did not set it, but would it matter since my information was still built around a temp table and a separate update query?
 
Upvote 0
You can't run the code I provided without establishing the reference or re-writing it to use a late bind, which is not necessary, yes, set the reference. It's a more advanced VB concept.

Yes, I worked in records centre for a while, I can picture what you're doing. Don't follow the bit about bogus field population, is there a problem with some of your barcodes?
 
Upvote 0

Forum statistics

Threads
1,221,545
Messages
6,160,446
Members
451,646
Latest member
mmix803

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top