Robert88
Robbie
- Local time
- Tomorrow, 00:46
- Joined
- Dec 18, 2004
- Messages
- 333
Hi Everyone,
I hope someone can help.
I have a form with a combo boxes and a table with relevant list and additional field, fldDefaultDrive (Yes/No Field).
Currently in order to set the default value, I have used the following code for each default;
However, I want users to be able to go into the table and change the default value if thier CD player default Drive is anything but D:\ Drive. I have tried to replace the D above with an SQL statement but with no success.
This is definetly not working, can anybody help, I have a feeling it is syntax but not sure where?
Robert88
I hope someone can help.
I have a form with a combo boxes and a table with relevant list and additional field, fldDefaultDrive (Yes/No Field).
Currently in order to set the default value, I have used the following code for each default;
Code:
Private Sub Form_Load()
Forms!frmMediaLabeller!CboDriveName.DefaultValue = """[COLOR="Red"]D[/COLOR]"""
End Sub
However, I want users to be able to go into the table and change the default value if thier CD player default Drive is anything but D:\ Drive. I have tried to replace the D above with an SQL statement but with no success.
Code:
Private Sub Form_Load()
Dim Drivename As String
Drivename = SELECT tblMediaDrive.fldDrivename FROM tblMediaDrive WHERE (((tblMediaDrive.fldDefaultDrive)=-1));
Forms!frmMediaLabeller!CboDriveName.DefaultValue = """[COLOR="Red"]Drivename[/COLOR]"""
End Sub
This is definetly not working, can anybody help, I have a feeling it is syntax but not sure where?
Robert88