Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding the datepicker value to a table in Access

Status
Not open for further replies.

rundmc

Programmer
Jan 16, 2003
15
US
Ok, Im using the datepicker control to validate the date but I want to add the value the user chooses to an Access table I've created. I'm using the ADODB.Recordset to add the values of the other controls on the form
to the table (these controls are all combo boxes).How can I alter the following code to add the date as chosen from the datepicker?


Dim adoconnection As ADODB.Connection
Set adoconnection = New ADODB.Connection

adoconnection.Open ("Provider=Microsoft.jet.oledb.4.0;" & "Data Source =H:\AssetTracking.mdb")

Set rs1 = New ADODB.Recordset
rs1.Open "select * from Licenses_Owned ", adoconnection, adOpenDynamic, adLockOptimistic


rs1.AddNew
rs1!LicenseOwnedID = TxtLicOwn.Text
rs1!ProductID = CboProduct.Text
rs1!Department = CboDept.Text
rs1!VendorID = CboVendor.Text
rs1!Location = CboLocation.Text
rs1!LicensesPurchasedpre201 = CboLPurch.Text
rs1!LicensesConvertedon201 = CboLConvert.Text
rs1!LicensesObtainedon201 = CboLObtain.Text
rs1!LicensesObtainedPost201 = CboLPost.Text
rs1!AcquisitionConversionDate = CboAcquisition.Text
rs1!ForUseWithBy = CboForUse.Text
rs1!SupportLevel = CboSupport.Text
rs1!AgreementNumber = CboAgreement.Text

rs1.Update
rs1.Close
Set r1s = Nothing




Thanks a million






 
Assuming that you are placeing the date in the field I chose,

rs1!AcquisitionConversionDate = DTPicker1.Value

If the field is incorrect then change it.
Thanks and Good Luck!

zemp
 
Any idea on how to reset the value of the date picker to the current date so that when when the user returns to the page that is the value held in the date picker??
 
DTPicker1.value=date Thanks and Good Luck!

zemp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top