Afternoon all.
Sorry for 2nd question in the day. Atleast i solved the first one myself
I have done some searching online and the code i am looking for has sooooo many variations that i am failing to find one that works and that i understand.
Looking for some code that Searches "Tbl_Category" in Field "Category" for a value that is manually entered into "Frm_New_Category"
all i am looking for is the if statement, If the value exists a message pops up saying it exists already. If it does not exist it will move onto the code that i already have in place to save what i need it to.
The code i am using to save the textbox value is as follows.
Code:
Private Sub CmdBtn_Save_Click()
Dim rs As Recordset
Set rs = CurrentDb.OpenRecordset("Tbl_Category")
With rs
.AddNew
!Category = Me.Textbox_New_Category
.Update
End With
Me.Textbox_New_Category.Value = ""
Me.Requery
Me.Refresh
End Sub
Thanks in advance