-
Auto Display details when entering ID
Hi All!
I'm working on a Personal Information Database.
I want my system to do the following whenever I enter a person's ID:
If the ID is already entered before, I want all the personal info fields to be populated with the person's details.
If the ID is not entered, then I will enter all the person's details.
Any help will be very much appreciated!
Regards,
CS.
-
What do you need help with? You enter an id, query for the user based on the entered ID, and fill in the info if found.
Which part of that do you need help with?
-
I want to know how to do that!
-
Just run select statement for that id. If returns nothing, you enter details.
-
Try to do it. If you run into specific obstacles or problems, ask, and we'll lend a hand.
-
Guys, my problem is not how to create a form or check whether an ID has been previously entered or not.
My problem is auto populating fields if they were already enteredt before.
Here is what I did:
I have a PersonInfo with the following field:
ID (Primary),
Name (Text),
DateOfBirth (Date),
Address (Text)
and I have created a form comtaining the above field.
now I want the Name, DateOfBirth, Address field to be automatically populated whenever I type in an ID that have been entered before. i.e. if I entered ID# 123 and entered it's Name, DateOfBirth and Address, and I came back to enter the same ID again, the Name, DateOfBrith and Address field will be automatically populated.
Regards,
CS.
-
What kind of form? An access form? A form on a webpage?
-
Access form.
Here is what I did:
Hi Guys,
I created a combobox containing the ID and whenever I type in an ID in the combobox that have been previously entered I can retirve all the related information
However when I'm entering a new ID the combobox
doesn't allow it. I have read that I can do
that using the NotInList event and I found a
code for it. but it's doesn't work.
Does anyone know a code that works?
following you can find the code that I have
used:
http://support.microsoft.com/default.aspx?scid
=kb;en-us;197526
this is the part that I have problem with:
' Look for the customer
the user created in the Customers form.
Result = DLookup("[CompanyName]", "
Customers", _
"[CompanyName]='" & NewData & "'")
If IsNull(Result) Then
' If the customer was not created, set
the Response argument
' to suppress an error message and undo
changes.
Response = acDataErrContinue
' Display a customized message.
MsgBox "Please try again!"
Else
' If the customer was created, set the
Response argument to
' indicate that new data is being added.
Response = acDataErrAdded
End If
my problem :
when I enter a new ID it asks me if I want to
add it to the combobox. however when I click on
Yes it gives me the "Please try again!"
message.
Any help will be very much appreciated!
Regards,
CS.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|