Hello all,
If someone could take a look at my database and see how I can make my tag validation take place that would be SO APPRECIATED!!! I have read through close to 600 threads on validation and I could not find one that would help me, due to my lack of vb knowledge.
Subject: Data entry on inventory tags {Attached DB}
I have 4 stations set up for tag entry – that compare 2nd counts with 1st counts and have a pop-up window telling the user there is a count discrepancy.
Then I have a “Voided” tag form on the Admin Tab that we enter any tags that we want removed from any of the reports.
Now the problem is the tags come in three sections and have the “SAME” tag number on each tag. Now I wanted a validate every tag that enters the 4 stations to check the tag they just entered has not been “VOIDED”, and if so a MSG pop-up “please return to Inventory Control”, and the macro running the pop-up would delete the record entry of the voided tag and let the user resume to the next tag entry.
Here is the VB code convereted from a macro that wont work, however, it may give an idea on what I am trying to accomplish.
'------------------------------------------------------------
' Station_1_Voided_Reference
'
'------------------------------------------------------------
Function Station_1_Voided_Reference()
On Error GoTo Station_1_Voided_Reference_Err
With CodeContextObject
If ((.TagNumber = .T_Voids!TagNumber)) Then
Beep
MsgBox """Warning"" You entered a ""Voided Tag"". Please notify Inventory Control.", vbExclamation, ""
End If
DoCmd.SetWarnings False
DoCmd.OpenTable "T_Station_1", acViewNormal, acEdit
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdDeleteRecord
DoCmd.Save acTable, "T_Station_1"
DoCmd.RunCommand acCmdRefresh
DoCmd.SetWarnings True
End With
Station_1_Voided_Reference_Exit:
Exit Function
Station_1_Voided_Reference_Err:
MsgBox Error$
Resume Station_1_Voided_Reference_Exit
End Function
If anyone choose to end my crazyness, I would be your debt forever.
P.S - Philo-o-Milo if your out there, I hope you get a chance to go over this, from all the posts and answers I read from you. You have to be the most helpful sole I have ever seen.
Regards All
Steve - AKA Sleepless in San Diego
If someone could take a look at my database and see how I can make my tag validation take place that would be SO APPRECIATED!!! I have read through close to 600 threads on validation and I could not find one that would help me, due to my lack of vb knowledge.
Subject: Data entry on inventory tags {Attached DB}
I have 4 stations set up for tag entry – that compare 2nd counts with 1st counts and have a pop-up window telling the user there is a count discrepancy.
Then I have a “Voided” tag form on the Admin Tab that we enter any tags that we want removed from any of the reports.
Now the problem is the tags come in three sections and have the “SAME” tag number on each tag. Now I wanted a validate every tag that enters the 4 stations to check the tag they just entered has not been “VOIDED”, and if so a MSG pop-up “please return to Inventory Control”, and the macro running the pop-up would delete the record entry of the voided tag and let the user resume to the next tag entry.
Here is the VB code convereted from a macro that wont work, however, it may give an idea on what I am trying to accomplish.
'------------------------------------------------------------
' Station_1_Voided_Reference
'
'------------------------------------------------------------
Function Station_1_Voided_Reference()
On Error GoTo Station_1_Voided_Reference_Err
With CodeContextObject
If ((.TagNumber = .T_Voids!TagNumber)) Then
Beep
MsgBox """Warning"" You entered a ""Voided Tag"". Please notify Inventory Control.", vbExclamation, ""
End If
DoCmd.SetWarnings False
DoCmd.OpenTable "T_Station_1", acViewNormal, acEdit
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdDeleteRecord
DoCmd.Save acTable, "T_Station_1"
DoCmd.RunCommand acCmdRefresh
DoCmd.SetWarnings True
End With
Station_1_Voided_Reference_Exit:
Exit Function
Station_1_Voided_Reference_Err:
MsgBox Error$
Resume Station_1_Voided_Reference_Exit
End Function
If anyone choose to end my crazyness, I would be your debt forever.
P.S - Philo-o-Milo if your out there, I hope you get a chance to go over this, from all the posts and answers I read from you. You have to be the most helpful sole I have ever seen.
Regards All
Steve - AKA Sleepless in San Diego