Hi,
I am taking values from a database and using them to populate three textboxes using the code below; Basically SettingID is numerical value and settingValue contains a filepath string. SO in the below code when a form loads i want the 3 file path strings to be taken from the directory and placed in the 3 relevant textboxes. My problem is that when I run the code in my VB project, even though they have different values in the database txtDownload.Text and txtUploaded.Text end up with the value that resides in the recordset containing the value for SettingID = 4, which is what txtUploaded.Text should be but not txtDownload.Text. The first value txtUpload.Text contains the correct value.
Any help would be greatly appreciated,
John
AdodcSettings.Recordset.MoveFirst
AdodcSettings.Recordset.Find "SettingID = 1"
txtUpload.Text = AdodcSettings.Recordset.Fields("SettingValue")
uploadString = txtUpload.Text
AdodcSettings.Recordset.MoveFirst
AdodcSettings.Recordset.Find "SettingID = 2"
txtDownload.Text = AdodcSettings.Recordset.Fields("SettingValue")
downloadString = txtDownload.Text
AdodcSettings.Recordset.MoveFirst
AdodcSettings.Recordset.Find "SettingID = 4"
txtUploaded.Text = AdodcSettings.Recordset.Fields("SettingValue")
uploadedString = txtUploaded.Text
I am taking values from a database and using them to populate three textboxes using the code below; Basically SettingID is numerical value and settingValue contains a filepath string. SO in the below code when a form loads i want the 3 file path strings to be taken from the directory and placed in the 3 relevant textboxes. My problem is that when I run the code in my VB project, even though they have different values in the database txtDownload.Text and txtUploaded.Text end up with the value that resides in the recordset containing the value for SettingID = 4, which is what txtUploaded.Text should be but not txtDownload.Text. The first value txtUpload.Text contains the correct value.
Any help would be greatly appreciated,
John
AdodcSettings.Recordset.MoveFirst
AdodcSettings.Recordset.Find "SettingID = 1"
txtUpload.Text = AdodcSettings.Recordset.Fields("SettingValue")
uploadString = txtUpload.Text
AdodcSettings.Recordset.MoveFirst
AdodcSettings.Recordset.Find "SettingID = 2"
txtDownload.Text = AdodcSettings.Recordset.Fields("SettingValue")
downloadString = txtDownload.Text
AdodcSettings.Recordset.MoveFirst
AdodcSettings.Recordset.Find "SettingID = 4"
txtUploaded.Text = AdodcSettings.Recordset.Fields("SettingValue")
uploadedString = txtUploaded.Text