Ok, well I am not sure this is the best way to get this done, but here goes. I have a database which lets users select items from a list on the left which will be added to the list on the right. When the forms opens it loads their preferences from the table based on their windows login name using the following code.
The list, while having all 3 fields in it, only displays field 2 (sData) which is a program name. What I am trying to do is find a way to be able to move an item in the list up a row. I am wondering if there is a way to use code to get both of the autonumber values and switch them, then requery the table? Would this work? If so, how do I do that? If not, does anyone have a better idea for me?
Any help is appreciated!
Dan
Code:
Private Sub Form_Load()
strAlias = VBA.Environ("UserName")
lstStart.RowSource = "SELECT qData.AutoNumber, qData.sData, qData.sPath FROM qData WHERE (((tData.sUserName)='" & strUserName & "'));"
End Sub
The list, while having all 3 fields in it, only displays field 2 (sData) which is a program name. What I am trying to do is find a way to be able to move an item in the list up a row. I am wondering if there is a way to use code to get both of the autonumber values and switch them, then requery the table? Would this work? If so, how do I do that? If not, does anyone have a better idea for me?
Any help is appreciated!
Dan