Hello,
I am trying to figure out how to populate a date in one text field within my form, that will then populate another field for 15 days out.
I am still learning access so any help would be appreciated! Thank you!
Traci
Hello,
I am trying to figure out how to populate a date in one text field within my form, that will then populate another field for 15 days out.
I am still learning access so any help would be appreciated! Thank you!
Traci
Are these bound or unbound fields (are they linked to fields in a query or table)?
What you would essentially to do is add VBA code to the AfterUpdate event of the date field you are entering into that will populate the other one with a date 15 days from the field that was just entered into, i.e.
Code:Private Sub txtDate1_AfterUpdate() If IsDate(Me.txtDate1) Then Me.txtDate2 = Me.txtDate1 + 15 End If End Sub
Requires code (VBA or macro) to save the calculated value into table field. However, why save? Can just calculate in query or textbox when needed: [field1] + 15
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
They are linked to a table.
I am not sure I understand. If the text field is part of table how or where would I insert the [Field1] + 15 ?
I don't know where I would add that code. Sorry, I don't know access that well.
You could use Calculated type field in table.
Otherwise, use the expression in query or in a textbox ControlSource.
Performing calculations with fields is basic functionality. Any introductory tutorial book would have covered this. Have you completed any tutorials?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
No I haven't