HELP, this desperate VB beginner!!!!
I created a Database Application: VB front-end and MS Access back-end. Now I'm trying to generate a couple of reports.
I'm using a DAO control but I am STUCK big time: I'm trying to get a percentage (field2/field1 - values passed from the Access table) and put the result in field3 but it's not working.
By the way this is the extent of my code so far.
-------------------------------
Option Explicit
Private Sub Detail_Format()
If Field1.DataValue = 0 And Field2.DataValue = 0 Then
Field3.DataValue = 0
Else
Field3.DataValue = Field2.DataValue / Field1.DataValue
End If
End Sub
-------------------------
Thanks in advance
I created a Database Application: VB front-end and MS Access back-end. Now I'm trying to generate a couple of reports.
I'm using a DAO control but I am STUCK big time: I'm trying to get a percentage (field2/field1 - values passed from the Access table) and put the result in field3 but it's not working.
By the way this is the extent of my code so far.
-------------------------------
Option Explicit
Private Sub Detail_Format()
If Field1.DataValue = 0 And Field2.DataValue = 0 Then
Field3.DataValue = 0
Else
Field3.DataValue = Field2.DataValue / Field1.DataValue
End If
End Sub
-------------------------
Thanks in advance