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
|
|||
|
|||
default in new record
Hi,
I created a form that has some textboxes - not connected, to insert into them values. Those values will be the default for the records in this form. When this form is opened, the new record is null from default. How can I refresh the new record, to contain the defaults. Now, After the defaults inserted, I enter to design mode and immediately back to normal mode, it's work good - the defaults insert to the new record. I hope you anderstand my problem... |
#2
|
|||
|
|||
default in new record
rach,
Rather than use unbound text boxes to hold your default values, use the AfterUpdate event of that field to set the default value to what has just been entered. For example, a field named [City], where you just entered "Boston" Private Sub City_AfterUpdate() City.DefaultValue = " ' " & City & " ' " End Sub (**I put a space between the quote marks for clarity... remove them in your code). This will enter "Boston" in every new record you create during that form session. If you change the City to "Chicago" at any time, new records thereafter will have a defualt value of "Chicago" -- hth Al Campagna Microsoft Access MVP http://home.comcast.net/~cccsolutions/index.html "Find a job that you love... and you'll never work a day in your life." "rach" wrote in message news Hi, I created a form that has some textboxes - not connected, to insert into them values. Those values will be the default for the records in this form. When this form is opened, the new record is null from default. How can I refresh the new record, to contain the defaults. Now, After the defaults inserted, I enter to design mode and immediately back to normal mode, it's work good - the defaults insert to the new record. I hope you anderstand my problem... |
Thread Tools | |
Display Modes | |
|
|