Setting default value within form

xaviermobius

Registered User.
Local time
Today, 18:48
Joined
Jul 25, 2006
Messages
12
Hi, im new to the forums - this is my first post.

On a form i have a text box which holds the date that a file batch was taken to be processed. Each file holds the date of when the batch it originated from was taken. At the moment for ease of use the 'Default Value' of the text box is set to the batch's date.

I want to set it up so i can change the default value of the cell, so that when a new batch is to be processed the new date becomes the default value.

I am invisaging a button which brings up another form with a text box into which the new date can be put. when the form is saved and closed, the date recieved cell on the master form assumes the new default value.

gawd... methinks that was an awful explanation.

please help!
 
Thanks for your reply, i have taken it on board.

At the moment i have the following code, which stores the input date as variable batchdate. But for some reason it is not working when i try it. i get #Name? come up in the field.

Private Sub Command4_Click()

Dim batchdate As String
batchdate = InputBox("Enter batch date")
Dim stDocName As String
stDocName = "Table1"
Forms![Table1]![name].SetFocus
Forms![Table1]![name].DefaultValue = batchdate

End Sub
 

Users who are viewing this thread

Back
Top Bottom