Surname Database

surname database
my database using access 2007,want to be able to search for visitor,if exists,use existing record,if not,enter

when visitor comes,i enter their ID,if he/she exists,i enter a new record for her visit using the details already in the database.

But if he/she does not exist in the database,want to be able to enter his/her details in the visitor s details form and then after that,enter the details of his or her visit in the visitDetails form.

In other words,i have 2 forms,visitDetails which stores details of a visitor s visit such as timeIn,timeOut and natureOfVisit,the other form is visitorDetails which stores information about the visitot such as name,ID,surname,placeOfResidence.

I also have a query which prompts the user to enter the visitor ‘s ID,if a match is found,i want to be taken to the visitDetails to enter a new visit record for a visitor whose personal details already exist.
And if a match is not found,i want to be taken to the visitorDetails to enter personal details of a visitor and the to the visitDetails form to enter a new visit record for him/her.

thank for any help!

Yes you can do that. I assume that you have two recordsets named visitDetails and visitorDetails. And you input visitor id into a textbox called txtId. Let see if this one work. I’m not sure how it is done with Access 2007. But I’m using Visual Basic to talk to MS Access. I think the concept maybe the same.

‘ Assume I have rsVisitor as the object that point at the visitorDetails recordset
‘Move to the first record
rsVisitor.Movefirst
‘ Then you find the ID in the
rsVisitor.Find “ID = ‘” & txtID.text & “‘”

‘ The function FIND above will go from row to row to compare the ID string that you input and what exists inside the database. If it is exist the current position of the recordset is at the row that hold the ID. If not it will be End Of File

if rsVisitor.EOF then
‘ Not exist
else
‘ Exist
end if

Hope this will help
Regards

SQL Database Design in 11 minutes, part 1


Murphy Coat of Arms/Crest and Family Name History, meaning & origin plus Genealogy/Family Tree Research aid to help find clues to ancestry, roots, namesakes and ancestors plus many other surnames at the Historical Research Center Store


Murphy Coat of Arms/Crest and Family Name History, meaning & origin plus Genealogy/Family Tree Research aid to help find clues to ancestry, roots, namesakes and ancestors plus many other surnames at the Historical Research Center Store


$12.95


Family Name History scroll that can be used to create an intriguing wall plaque to display with pride. This guaranteed authentic collection of facts has been compiled for all people of your name, it is kept available in our collection to supply as required and will ship from stock. Over 400,000 names are readily available….

Morales Coat of Arms/Crest and Family Name History, meaning & origin plus Genealogy/Family Tree Research aid to help find clues to ancestry, roots, namesakes and ancestors plus many other surnames at the Historical Research Center Store


Morales Coat of Arms/Crest and Family Name History, meaning & origin plus Genealogy/Family Tree Research aid to help find clues to ancestry, roots, namesakes and ancestors plus many other surnames at the Historical Research Center Store


$12.95


Family Name History scroll that can be used to create an intriguing wall plaque to display with pride. This guaranteed authentic collection of facts has been compiled for all people of your name, it is kept available in our collection to supply as required and will ship from stock. Over 400,000 names are readily available….

Hernandez Coat of Arms/Crest and Family Name History, meaning & origin plus Genealogy/Family Tree Research aid to help find clues to ancestry, roots, namesakes and ancestors plus many other surnames at the Historical Research Center Store


Hernandez Coat of Arms/Crest and Family Name History, meaning & origin plus Genealogy/Family Tree Research aid to help find clues to ancestry, roots, namesakes and ancestors plus many other surnames at the Historical Research Center Store


$12.95


Family Name History scroll that can be used to create an intriguing wall plaque to display with pride. This guaranteed authentic collection of facts has been compiled for all people of your name, it is kept available in our collection to supply as required and will ship from stock. Over 400,000 names are readily available….

Avotaynu: The International Review of Jewish Genealogy (Spring 2013)


Avotaynu: The International Review of Jewish Genealogy (Spring 2013)



Contents Include: JRI-Poland: Review and New Developments; Israel Report: Spring 2013; Town Based Reindexing of the Ellis Island Database; First Systematic Register of Jewish Families in Bohemia: The 1724 Census; Ukraine Special Interest Group Revitalized: A Progree Report; Nomen Open: The Names and Surnames of the Jews of Italy; Genealogical Golems of the MaHaRal’s Family; Using Indirect Evidence…