I'm hoping someone can help here. I have a continuous form in Access 2013, I have code in already which allows you to search for a specific item, this is on click event for a button, I also have a reset which again is on click event for another button. Through using a query in a row source of a combo box I have managed to create a combo that limits what can be selected by a field in the form. (Thanks to Matt Hill) There is also a current event as a combobox requery running too.
I have also managed to put a textbox over the combo boxes to hide them, however I can't get the text boxes to show what the combo boxes have and then keep that data when I move onto the next combo box and select another item, what is currently happening is that the combo boxes keep changing and all display the same object when chosen and when I move to the next combo box it clears the data in all combo boxes and show the new selection instead.
This is driving me mad so any help what so ever would be greatly appreciated.
Hi All update, please see the VBA below for what is running:
Private Sub Command26_Click()
Dim strsearch As String
Dim Task As String
'Check if a keyword entered or not
If IsNull(Me.txtsearch) Or Me.txtsearch = "" Then
MsgBox "Please type in your search keyword.", vbOKOnly, "Keyword Needed"
Me.txtsearch.BackColor = vbYellow
Me.txtsearch.SetFocus
Else
strsearch = Me.txtsearch.Value
Task = "SELECT * FROM Base_Data WHERE ((PARENT_FSC Like ""*" & strsearch & "*""))"
Me.RecordSource = Task
Me.txtsearch.BackColor = vbWhite
End If
End Sub
Private Sub Command27_Click()
Dim strsearch As String
strsearch = "SELECT * from Base_Data"
Me.RecordSource = strsearch
End Sub
Private Sub Form_Current()
Me.cboComponent.Requery
End Sub
As well as this code running I also have an SQL query in the record source of the Form Properties.
Again any help would be great.