Looking Up Records On A Data Entry Form

  • Thread starter DataDiva via AccessMonster.com
  • Start date
D

DataDiva via AccessMonster.com

Hello,

I have created a tabbed form that has four sub forms. The parent child links
are the (PK, AutoNumber) NCMR_Number and PTC_Part_Number. The database is set
up to track non-conforming material. I have separated the tabs out by
departments. The main (Parent) form contains general information about the
discrepant material. The four sub forms contain information about the
individual department's responsibilities in the process. After the parent
form is filled in and saved, users from different departments will be going
in and filling out information in the sub forms for their department. What I
would like to do is have a way for the user to lookup a record on the form
using the primary key. I would like the record to populate the form and allow
edits to the sub form portions so that users can enter their information for
their department. If a record does not already exist, then I would like them
to just start a new record they same way they would currently. I hope I'm on
the right track! Any help is always appreciated!

Thanks,

Courtney
 
A

Al Campagna

DataDiva,
On my website (below), I have a sample 97 and 2003 file called Combo
Quick Find.
These files demonstrate how to select a primary key from a combo box,
and go to that record.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
D

DataDiva via AccessMonster.com

Hello Al,

Thank you for a point in the right direction. I tried to duplicate the 2003
example from your website and it doesn't seem to be working. I created an
unbound combo and placed it into the detail section of my form. In the row
Source section I selected all of the fields that I wanted to have populate
the form, including the PK, which is an auto number. In the After Update
event I put in this code:

Private Sub cboFindNCMR_AfterUpdate()
DoCmd.GoToControl "NCMR_Number"
DoCmd.FindRecord cboFIndNCMR
DoCmd.GoToControl "Assembly_Number"
End Sub

When I make a selection from the combo box, I get an error message. Run-time
error 2137, you can't use find and replace now. I should mention I am using
Access 2007 not sure if that makes a difference or not.

If it's possible, I would like to look up the record and populate the form
without using a combo box. If not I would appreciate any help getting your
first method to work!

Thanks,

Courtney
 
D

DataDiva via AccessMonster.com

Just wanted to let you know I discovered the FIlter by Form feature and I
think that was exactly what I needed. Thanks for the help!

Courtney
 
A

Al Campagna

DataDiva,
OK. I'm sure there was just some small problem with the way you
transposed my sample to your particular case.
But... if the Filter By Form works for you, then good deal...
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top