Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

referencing a subform field from the form

Status
Not open for further replies.

MrsTFB

MIS
Oct 3, 2000
307
US
I have a subform that gives the maximum value in a field, [MaxOfDrwNum], that subform is on a form with a button, that when pushed I want it to check that the new DrwNum value is only 1 greater than the MaxDrwNum. I have the code below in the click properties of the button.

Obviously something is not right, probably some declarations or parenthesis or something.

If anyone could help me out with an example or something, it would cure my raging headache!!!!!!

Thanks,
Bsimm


If DrwNum.Value - SUBFRMDrwMax![MaxOfDrwNum].Value = 1 Then


Text14.Visible = True





 
Here's the entire code, if it helps,

Bsimm
Private Sub Command25_Click()
On Error GoTo Err_Command25_Click


If DrwNum.Value - SUBFRMDrwMax![MaxOfDrwNum].Value = 1 Then


Text14.Visible = True


Exit_Command25_Click:
Exit Sub

Err_Command25_Click:
MsgBox Err.DESCRIPTION
Resume Exit_Command25_Click

End Sub
 
See my post in the General forum. I would remind you that it is not a good idea to cross-post the same question like this though. It is annoying to many people and you may not get your question answered because of it. Joe Miller
joe.miller@flotech.net
 
Thanks for the input, I found this area of Access questions after I had posted in General and thought it might be more suited to this section with Queries.

Sorry! :~/
Bsimm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top