Good evening! Hello from Brazil to you all !!!
OVERVIEW
I have attached a small db to illustrate my problem.
TblAtzNor is a price table. I can input prices today to be effective today or at any future date, meaning the ordinary keys will not necessarily match the ascending effective dates. This table is the data source for the FrmBuscaPrNor.
FrmBuscaPrNor will be triggered thru the FrmCadastro, so if I select Price Type "NORMAL" from the combo in the FrmCadastro then the FrmBuscaPrNor will pop up showing a price list. I want to click in that price list to pick a price based on its Effective Date. The picked price should load my FrmCadastro. However, I want to warn the user when he does not pick the current price.
Keep in mind that my price list does not show future effective date prices. In addition, current price can be from a month ago (still current). That is the reason why I based my instruction of the Private Sub LstPrNor_Click() event on DMax effective date and not on DLast input date.
THE PROBLEM
In the Private Sub LstPrNor_Click() event the system does not get into the first leg of the "If" instruction because it reads null for Me.LstPrNor.Column(6). As a result I get the warning in all cases, in spite of the user choice. I don't have a clue on how to make it work. I do not understand why it reads null in the Me.LstPrNor.Column(6).
Why is it so tricky? What is wrong, please? Thank you.