If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
I wany to record an IP address in access
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. |
#2
|
|||
|
|||
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 wrote in message ... 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. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Need Help In Printing Current Record in Specific Report | RNUSZ@OKDPS | Setting Up & Running Reports | 1 | May 16th, 2005 09:06 PM |
Access 2003 runtime and MS Soap | Sharat Koya | General Discussion | 25 | January 26th, 2005 10:17 AM |
Access XP Compared to Access 2003 | Mardene Leahu | New Users | 1 | October 1st, 2004 05:11 AM |
Keeping old customer address when they move house. | Russell | General Discussion | 8 | July 19th, 2004 12:24 PM |
Sorting address book in Outlook 2002 | Scott | Contacts | 10 | June 7th, 2004 11:46 PM |