| Software > Access Macros > Look up record ... |
|
| << Topic |
< Post |
Post 1 of 3 Topic 5613 of 5947
|
Post > |
Topic >> |
Look up record based on one criteria, populate fields, increment & re-populate
by "Russell. via AccessMonster.com" <u43716@[EMAIL PROTECTED]
>
Jul 9, 2008 at 10:19 AM
|
Folks,
Going around in circles, maybe trying to do this the wrong way?
I have an MS Access 2007 table which has tenants names in it. If there are
two tenants in one property they have the same contract number.
I am trying to create a macro that looks up a contract number and then
populates two text boxes with First Name, Last Name of Tenant 1 and then
goes
to the next record and populates two text boxes with First Name, Last Name
of
Tenant 2.
I don't seem to be able to look up the record, and I don't seem to be able
to
go to the next record! Here is my Macro code:
GotoControl
[Contract]
FindRecord
"[Contract Number]" **This is a text box where I put in
the contract number**
Whole Field
All
No
All
Yes
Yes
SetValue
[Forms]![Macro Test Form]![FirstName1]
[First Name]
SetValue
[Forms]![Macro Test Form]![LastName1]
[Last Name]
NextRecord
SetValue
[Forms]![Macro Test Form]![FirstName2]
[First Name]
SetValue
[Forms]![Macro Test Form]![LastName2]
[Last Name]
I'd certainly appreciate any assistance anyone can offer me as to where I
am
going wrong!
Thanks in advance!
Russell.
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-macros/200807/1


|
3 Posts in Topic:
|
"Russell. via Access |
2008-07-09 10:19:36 |
|
=?Utf-8?B?S0FSTCBERVdFWQ= |
2008-07-09 14:33:01 |
|
"Russell. via Access |
2008-07-10 11:15:56 |
|
Post A Reply:

|