calculation incorrect

awake2424

Registered User.
Local time
Yesterday, 18:12
Joined
Oct 31, 2007
Messages
479
I can not figure out why in the attached database the Due Date gets calculated incorrectly (off by 1 day). If text is entered into the HLA ID field the Date Received is 8/16/2014. If then in the test dropdown "STR" is selected, the Due Date is calculated to be 8/19/2014 (should be 8/18/2014). This should be a simple database but it has proved to be more complex than anticipated. Thank you.
 

Attachments

Seriously awake when would this one calculation ever end? :eek: This is probably the 5th try or something? ;)

So what seems to be the problem this time?
 
Is there a way to prevent the Date Received from changing after the Test has been selected?

For example, if you type 1 into the HLA ID field Date Received is 8/18/2014, but when a test "LR" is selected it changes to 8/19/2014 (this is correct). If the user meant to select test "HR" instead the Date Received changes to 8/20/2014 (this is not correct). Even if the user selects another test the Date Received is still 8/19/2014, in this case. Thanks.
 
I've amended your code a couple of times and on looking at your db, some of the redundant lines of code I took off you've put them back on. Even some lines of code that were added before, you took off.
And you've gone back to your style of writing code, which makes it hard to read.
 
so without looking, what is the code you are running to update the "date received" to the "due date"?

if its only adding 2/3 days, it can't be too hard.
 
The amended code did not work when I tried it, so I added some lines back to get most of the db to work. I am learning and hopefully improving in VB, but this is a new problem for me. Thank you.
 

Users who are viewing this thread

Back
Top Bottom