C
cw via AccessMonster.com
I have the following code to calculate the correct SUBNET mask & GATEWAY
(depending on the third part of the IP Address txtPartIII):
----------------------------------
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Select Case Me.txtPartIII
Case Is = "248"
Me.txtSubNetMask = "255.255.255.0"
Me.txtGateway = "64.83.248.1"
Case Is = "252"
Me.txtSubNetMask = "255.255.255.248"
Me.txtGateway = "10.0.0.1"
Case Is = "253"
Me.txtSubNetMask = "255.255.255.252"
Me.txtGateway = "10.0.0.1"
End Select
End Sub
--------------------------------
My problem is with the Gateway on the Second IP address (see sample below):
- The IP addresses are a "stored" value in the database. Subnet & Gateway are
not.
- When the Report is generated, all of the Subnets & Gateways calculate fine
except the Gateway for the second IP address. Here is an example of what the
first two should be when printed:
Static IP: 64.83.253.105
Subnet: 255.255.255.252
Gateway: 10.0.0.1 <---------------
Static IP: 64.83.253.106
Subnet: 255.255.255.252
Gateway: 64.83.253.105 <------------
The first Gateway is always 10.0.0.1
The second Gateway is always the same as the first IP address.
How would I alter my code above to correctly generate that second Gateway so
that it is the same as of the first IP address?
Thanks for any tips,
cw
(depending on the third part of the IP Address txtPartIII):
----------------------------------
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Select Case Me.txtPartIII
Case Is = "248"
Me.txtSubNetMask = "255.255.255.0"
Me.txtGateway = "64.83.248.1"
Case Is = "252"
Me.txtSubNetMask = "255.255.255.248"
Me.txtGateway = "10.0.0.1"
Case Is = "253"
Me.txtSubNetMask = "255.255.255.252"
Me.txtGateway = "10.0.0.1"
End Select
End Sub
--------------------------------
My problem is with the Gateway on the Second IP address (see sample below):
- The IP addresses are a "stored" value in the database. Subnet & Gateway are
not.
- When the Report is generated, all of the Subnets & Gateways calculate fine
except the Gateway for the second IP address. Here is an example of what the
first two should be when printed:
Static IP: 64.83.253.105
Subnet: 255.255.255.252
Gateway: 10.0.0.1 <---------------
Static IP: 64.83.253.106
Subnet: 255.255.255.252
Gateway: 64.83.253.105 <------------
The first Gateway is always 10.0.0.1
The second Gateway is always the same as the first IP address.
How would I alter my code above to correctly generate that second Gateway so
that it is the same as of the first IP address?
Thanks for any tips,
cw