neilwebber
Registered User.
- Local time
- Today, 17:50
- Joined
- Aug 19, 2002
- Messages
- 35
Hello everyone,
I've had a good look round the forum and I'm sure the answer's already out there (most of them are) but can't quite find it. I'm guessing that this is fairly basic stuff but recordsets are new to me......
I have a query called qryA. The query has two fields, StringA and StringB.
I have a combo box called cmbA which is populated with values from StringA. Depending on the choice in the combo (cmbA.Value?) I would like to return the corresponding value in StringB and be able to refer to this value to perform other operations. This is as far as I've got from what I've found here already but without really grasping the basics I'm struggling a bit.
Dim MyValue As String
MyValue = CurrentDb.OpenRecordset("select StringB from qryA where [StringA] ='" & cmbA.Value & "';")
'then say....
MsgBox ("MyValue") to show the value from StringB
any words of wisdom are greatly appreciated, other than 'give up now!', I've already considered that
Cheers
Neil
I've had a good look round the forum and I'm sure the answer's already out there (most of them are) but can't quite find it. I'm guessing that this is fairly basic stuff but recordsets are new to me......
I have a query called qryA. The query has two fields, StringA and StringB.
I have a combo box called cmbA which is populated with values from StringA. Depending on the choice in the combo (cmbA.Value?) I would like to return the corresponding value in StringB and be able to refer to this value to perform other operations. This is as far as I've got from what I've found here already but without really grasping the basics I'm struggling a bit.
Dim MyValue As String
MyValue = CurrentDb.OpenRecordset("select StringB from qryA where [StringA] ='" & cmbA.Value & "';")
'then say....
MsgBox ("MyValue") to show the value from StringB
any words of wisdom are greatly appreciated, other than 'give up now!', I've already considered that

Cheers
Neil