Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

Auto increment textbox

$
0
0

Hello, 

I have a textbox on a form called ReservationID, I would like to be able to assign a value to this field automatically. I have created a query which lists all of the existing ID, called Qry_ReservationID. I have this code under form_open so far:

    If Not IsNull(Me.ReservationID) Then
    Me.ReservationID = DMax("ReservationID", "Qry_ReservationID") + 1
    End If

I want the ID to be set to AB0000, and it goes up by 1.

The ReservationID field in Reservations is set to text.


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>