Ask Experts Questions for FREE Help !
Ask
    mmu01891's Avatar
    mmu01891 Posts: 2, Reputation: 1
    New Member
     
    #1

    May 29, 2008, 08:12 AM
    Search for visitor,if exists,use data,else,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!
    ScottGem's Avatar
    ScottGem Posts: 64,966, Reputation: 6056
    Computer Expert and Renaissance Man
     
    #2

    May 29, 2008, 08:25 AM
    In the After Update event of the control where you enter the Visitor ID add code like:

    If Not IsNull(DLookup("[VisitorID]","tblVistors"."[VisitorID] = " & Me.txtVisitorID)) Then

    DoCmd.OpenForm "frmNewVisit"

    Else

    Docmd.OpenForm "frmNewVisitor"

    End If

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Not Crazy.I know this movie exists [ 1 Answers ]

Okay, here it goes... these kids run away. They end up in a shed in the middle of the woods that is surrounded with pecan trees with a old tractor inside. They argue about how you pronounce "pecan". One of the kids goes up to a "Texaco" station and there is a box of cupcakes on the step which he...

Got P-Trap, Confirm it Exists [ 3 Answers ]

I have a house built in 1981 unfinished basement. Roughed in bathroom pipes. One pipe vent, one pipe shower/bath, one pipe toilet. Anyhow, on the shower/bath pipe I poured water down the pipe, drains normal but I can still see water at bottom (no evidence of tee ot 90deg bend at bottom) does...

Shower Where No Drain Exists [ 1 Answers ]

We would like to install a shower in a bathroom which has a sink and toilet but no rough in for a shower. The problem is that the bathroom has a cement floor which is not cuttable. Any solution for an above ground drainage which connects in the sink/toilet?

DOS exists? [ 15 Answers ]

With your new operating systems (i.e. Windows XP), does DOS exist/run in the background? Thanks.


View more questions Search