Hi all,
Thank you very much for your help so far. I know that cascading is a common topic here and I've been searching for the answer but couldn't quite locate anything. I have a two menu cascading system set up with a Category and SubCategory (dependant). I'm trying to set up a way to add new list items to the rowsource table, without having to actually add an item to the table.
Below is the event procedure (on not in list) that worked for other non-cascadin menus. I'm trying to figure out how to adapt this code or a similar code to work for a cascading menu where the rowsource changes often. If any of you know how to or know of a good keyword that I could use to search with, I would greatly appreciate it!
Private Sub Classification_NotInList(NewData As String, Response As Integer)
' Automatically enters the Classification name in the Classification table and
' displays it in the combo box
Dim DB As Database
Dim AuthorityLst As Recordset
Set DB = CurrentDb()
Set AuthorityLst = DB.OpenRecordset("Classification")
AuthorityLst.AddNew
AuthorityLst![Classification Name] = NewData
AuthorityLst.Update
Response = acDataErrAdded
End Sub
Thanks a lot!
Thank you very much for your help so far. I know that cascading is a common topic here and I've been searching for the answer but couldn't quite locate anything. I have a two menu cascading system set up with a Category and SubCategory (dependant). I'm trying to set up a way to add new list items to the rowsource table, without having to actually add an item to the table.
Below is the event procedure (on not in list) that worked for other non-cascadin menus. I'm trying to figure out how to adapt this code or a similar code to work for a cascading menu where the rowsource changes often. If any of you know how to or know of a good keyword that I could use to search with, I would greatly appreciate it!
Private Sub Classification_NotInList(NewData As String, Response As Integer)
' Automatically enters the Classification name in the Classification table and
' displays it in the combo box
Dim DB As Database
Dim AuthorityLst As Recordset
Set DB = CurrentDb()
Set AuthorityLst = DB.OpenRecordset("Classification")
AuthorityLst.AddNew
AuthorityLst![Classification Name] = NewData
AuthorityLst.Update
Response = acDataErrAdded
End Sub
Thanks a lot!