Re: I wany to record an IP address in access
- From: "Allen Browne" <AllenBrowne@xxxxxxxxxxxxxx>
- Date: Wed, 1 Jun 2005 22:08:06 +0800
Use 4 fields of type Byte.
You can print them with dots between the numbers if you wish.
To get the next available number in your form, use the AfterUpdate event
procedure of btye 3 to lookup the maximum number used so far for byte 4.
Example:
Private Sub Byte3_AfterUpdate()
Dim strWhere As String
Dim varResult As Variant
If Not (IsNull(Me.Byte1) Or IsNull(Me.Byte2) Or IsNull(Me.Byte3)) Then
varResult = DMax("Byte4", "Table1", strWhere)
If IsNull(varResult) Then
Me.Byte4 = 0
ElseIf varResult < 255 Then
Me.Byte4 = varResult + 1
End If
End If
End Sub
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Cider Baby" <Cider Baby@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A02FD462-4D64-4704-AF4D-7240EF96E212@xxxxxxxxxxxxxxxx
>I want to be able to record a different range of IP addresses for different
> types of devices. I want the database to give me the next available IP
> address.
.
- References:
- I wany to record an IP address in access
- From: Cider Baby
- I wany to record an IP address in access
- Prev by Date: Re: Table Fields Help
- Next by Date: Network Device Inventory Database
- Previous by thread: I wany to record an IP address in access
- Next by thread: Re: organizational charts
- Index(es):
Relevant Pages
|