Access97 help please

access newby

New member
Local time
Today, 00:26
Joined
Feb 17, 2013
Messages
4
Hi, just joined today and new to forums so forgive if doing this all wrong please.
Basically I have my project up and running but want to automate the addition of names into a look up table when they aren't found there when inputting to the main table. I have thousands of different names to put in so am now using a look up table to help.

I hope that is clear enough - I cannot find it covered in my access 97 manual or on line and do not know where to start searching on forums (perhaps you could help me there too).
Appreciate very much your time and efforts so hope someone can help please.
access newby
PS I am 63 and have computer programming HND but that was in cobal and pascal days and main frames! :D
 
Assuming you have a form to add records to your main table, you can put a combobox there which has a query as the record source.

Set the property list entries only to "yes". Then you can evaluate the NotInList event:
Code:
Private Sub cboSurnames_NotInList(NewData As String, Response As Integer)

    If MsgBox("Unknown name." & vbLf & vbLf & "Add to list?", vbYesNo + vbQuestion) = vbYes Then
        DoCmd.RunSQL "INSERT INTO [I]NameOfYourLookupTable[/I] ( [I]NameOfYourField[/I]) VALUES ( '" & NewData & "' )"
        Response = acDataErrAdded
    Else
        [I]YourComboBox[/I].Value = Null
        Response = acDataErrContinue
    End If

End Sub
 
I think we need to know a little more of what you have and where these
thousands of names reside.

StarGrabber is guessing that you are using a form because you haven't told us any details.
Since you have thousands of names, I'm guessing they're in various text files/lists and that you want to load these into some table.

But we're both trying to guess your situation.
For more focused responses, you're going to have to describe what you have, what you want and any questions you have.

Welcome and good luck
 
Many thanks 'jdraw' and 'stargrabber' for your replies.:)

I wasn't sure how far I needed to go so just outlined my immediate problem.
At present I do not use forms but just type everything into one of three tables which hold parish records of baptisms, marriages and burials respectively.

I have thousands of names and details currently on paper records that I am transcribing onto this database to make searching easier eventually.

I have set up look up tables for fornames and surnames as well as status (which is pretty limited so not a problem)

The look up tables are only to help by completing the name after I start typing it in the table, which is saving me a lot of effort. However I am coming across (obviously) loads of new names all the time which I currently add to the look up table at the end of my sessions ready for next session of data input.

I have thousands of names, partly due to different ways of spelling the same name since the 1500's (yes it goes back that far).

If I need to switch to forms to do this then I will.

I am just concerned at present with data input and will worry about getting it out later (probably years later as have over 400 pages of written records at about 50 to a page).

Many thanks for your help.
access newby
 
One of the purposes of forms is to make data entry more comfortable. The "switch to forms" isn't that difficult. I suggest you flip the switch right now. Use the wizzard - and this forum. ;)
 
The wizard hasn't been too helpful as cannot find any linkage between your 'set property list to yes', the code you gave and the wizard.

I think I may have to read through the manual step by step and by trial and error refresh my brain and learn again regarding all this as I feel there are chunks you missed out, I might be an ex programmer but my access experience is minimal meanwhile will have to carry on as is (at least it works).

Thank sanyway for trying to help guys.
 

Users who are viewing this thread

Back
Top Bottom