A
Andrea Odell via AccessMonster.com
I have a subform titled subfrmCustomerPtsTotals. It resides on the main
form titled frmLogin. The subfrmCustomerPtsTotals contains only two fields
Product Name and Points. I need a function that will be called when the
Main Form is opened. The function will pull the Points for each Product
Name and determine if the Points are > 11. If yes, a message box will
appear.
I can't figure out how to call a function from a main form that references
items in a subform. Nor am I completely sure about where the code for the
function should be placed. I have limited vb programming skills and
limited skills with Access. Thus, I'll need detailed assistance. I pasted
the current state of my function below.
Public Sub Redeem()
Dim Points As String
Dim Msg As String
Dim ans As Integer
Points = Me!ubfrmCustomerPtsTotals.frmLogin.txtSumOfPointValue1.Text
Msg = "Customer has earned a FREE " & Me!
subfrmCustomerPtsTotals.frmLogin.txtProductName.Text & ". Would you like to
redeem it?"
If Points >= 11 Then
ans = MsgBox(Msg, vbYesNo, "Free")
End If
End Sub
THANK YOU FOR YOUR ASSISTANCE.
form titled frmLogin. The subfrmCustomerPtsTotals contains only two fields
Product Name and Points. I need a function that will be called when the
Main Form is opened. The function will pull the Points for each Product
Name and determine if the Points are > 11. If yes, a message box will
appear.
I can't figure out how to call a function from a main form that references
items in a subform. Nor am I completely sure about where the code for the
function should be placed. I have limited vb programming skills and
limited skills with Access. Thus, I'll need detailed assistance. I pasted
the current state of my function below.
Public Sub Redeem()
Dim Points As String
Dim Msg As String
Dim ans As Integer
Points = Me!ubfrmCustomerPtsTotals.frmLogin.txtSumOfPointValue1.Text
Msg = "Customer has earned a FREE " & Me!
subfrmCustomerPtsTotals.frmLogin.txtProductName.Text & ". Would you like to
redeem it?"
If Points >= 11 Then
ans = MsgBox(Msg, vbYesNo, "Free")
End If
End Sub
THANK YOU FOR YOUR ASSISTANCE.