Hello
I'm working on a database for post mortem records. I've cobbled together a functioning database that does mostly what I want it to. It's not particularly relational, just one giant spread sheet, but the main feature is a form used to restrict how species data is entered.
I have a 'species' table (with species names, latin names, species codes) which I'm using as a lookup table, with several combo boxes autofilling after selection in one of the comboboxes from this table. I only want users to select from the list in the table so I have 'limit to list' on, but also want them to be able to type in the box and the list predict the species. I have this working but the problem is if you type a word which is not in the list I get error 3314, because I have 'required field' as true I believe.
Can anyone help me get around this problem? Some the code for the comboboxes is below. Many thanks in advance.
I'm working on a database for post mortem records. I've cobbled together a functioning database that does mostly what I want it to. It's not particularly relational, just one giant spread sheet, but the main feature is a form used to restrict how species data is entered.
I have a 'species' table (with species names, latin names, species codes) which I'm using as a lookup table, with several combo boxes autofilling after selection in one of the comboboxes from this table. I only want users to select from the list in the table so I have 'limit to list' on, but also want them to be able to type in the box and the list predict the species. I have this working but the problem is if you type a word which is not in the list I get error 3314, because I have 'required field' as true I believe.
Can anyone help me get around this problem? Some the code for the comboboxes is below. Many thanks in advance.
Code:
Private Sub Cmb_LATIN_Change()
Me.Cmb_WWTSPP.Value = Me.Cmb_LATIN.Column(1)
Me.txt_FAMILY.Value = Me.Cmb_LATIN.Column(7)
Me.Cmb_PSLATIN.Value = Me.Cmb_LATIN.Column(5)
Me.Cmb_SPPNO.Value = Me.Cmb_LATIN.Column(3)
Me.Cmb_PSSPP.Value = Me.Cmb_LATIN.Column(4)
Me.txt_uniquesppid.Value = Me.Cmb_LATIN.Column(0)
Me.Cmb_PSSPPNO.Value = Me.Cmb_LATIN.Column(6)
End Sub
Private Sub Cmb_PSLATIN_Change()
Me.txt_FAMILY.Value = Me.Cmb_PSLATIN.Column(7)
Me.Cmb_SPPNO.Value = Me.Cmb_PSLATIN.Column(3)
Me.Cmb_WWTSPP.Value = Me.Cmb_PSLATIN.Column(1)
Me.Cmb_LATIN.Value = Me.Cmb_PSLATIN.Column(2)
Me.Cmb_PSSPP.Value = Me.Cmb_PSLATIN.Column(4)
Me.txt_uniquesppid.Value = Me.Cmb_PSLATIN.Column(0)
Me.Cmb_PSSPPNO.Value = Me.Cmb_PSLATIN.Column(6)
End Sub
Private Sub Cmb_PSSPP_Change()
Me.txt_uniquesppid.Value = Me.Cmb_PSSPP.Column(0)
Me.Cmb_LATIN.Value = Me.Cmb_PSSPP.Column(2)
Me.Cmb_WWTSPP.Value = Me.Cmb_PSSPP.Column(1)
Me.txt_FAMILY.Value = Me.Cmb_PSSPP.Column(7)
Me.Cmb_PSLATIN.Value = Me.Cmb_PSSPP.Column(5)
Me.Cmb_SPPNO.Value = Me.Cmb_PSSPP.Column(3)
Me.Cmb_PSSPPNO.Value = Me.Cmb_PSSPP.Column(6)
End Sub
Private Sub Cmb_PSSPPNO_Change()
Me.Cmb_LATIN.Value = Me.Cmb_PSSPPNO.Column(2)
Me.txt_FAMILY.Value = Me.Cmb_PSSPPNO.Column(7)
Me.Cmb_PSLATIN.Value = Me.Cmb_PSSPPNO.Column(5)
Me.Cmb_WWTSPP.Value = Me.Cmb_PSSPPNO.Column(1)
Me.Cmb_PSSPP.Value = Me.Cmb_PSSPPNO.Column(4)
Me.txt_uniquesppid.Value = Me.Cmb_PSSPPNO.Column(0)
Me.Cmb_SPPNO.Value = Me.Cmb_PSSPPNO.Column(3)
End Sub
Private Sub Cmb_SPPNO_Change()
Me.Cmb_LATIN.Value = Me.Cmb_SPPNO.Column(2)
Me.txt_FAMILY.Value = Me.Cmb_SPPNO.Column(7)
Me.Cmb_PSLATIN.Value = Me.Cmb_SPPNO.Column(5)
Me.Cmb_WWTSPP.Value = Me.Cmb_SPPNO.Column(1)
Me.Cmb_PSSPP.Value = Me.Cmb_SPPNO.Column(4)
Me.txt_uniquesppid.Value = Me.Cmb_SPPNO.Column(0)
Me.Cmb_PSSPPNO.Value = Me.Cmb_SPPNO.Column(6)
End Sub
Private Sub Cmb_WWTSPP_Change()
Me.txt_uniquesppid.Value = Me.Cmb_WWTSPP.Column(0)
Me.Cmb_LATIN.Value = Me.Cmb_WWTSPP.Column(2)
Me.Cmb_PSSPP.Value = Me.Cmb_WWTSPP.Column(4)
Me.txt_FAMILY.Value = Me.Cmb_WWTSPP.Column(7)
Me.Cmb_PSLATIN.Value = Me.Cmb_WWTSPP.Column(5)
Me.Cmb_SPPNO.Value = Me.Cmb_WWTSPP.Column(3)
Me.Cmb_PSSPPNO.Value = Me.Cmb_WWTSPP.Column(6)
End Sub