Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / January 2008

Tip: Looking for answers? Try searching our database.

How to do this: either enter as new or search for existing?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ed from AZ - 11 Jan 2008 14:28 GMT
I don't know if this is the correct approach, but this is the idea
I've got:

A form will have a few controls to enter some data and two buttons.

One button is "Enter as New Record" - this one opens a subform for the
table with the initial data entered in as a new record and the other
fields available for data entry.

The other button is "Find Matching Record" - this one creates a
variable to go into a SELECT statement to search the table for a
record that matches the entered data, and then opens a subform to show
that record and other fields for data entry.

In playing around with this unsuccessfully, I noticed that the
CommandButton wizard has a preset function to go to the new record
field.  It seems to want to go to the new record field of the form's
record source, though.  But the form is built on a query to the table,
right?  So I would have to direct it to the new record field of the
table, and enter the data in the form into the appropriate fields.

I have a sample database for the SELECT code, and I think I can make
that work.  But that will return my data as a query result, right?  I
would need to pull up this record because I have more data to enter,
so I need to show it in a data entry subform based on the table so I
have the additonal fields, yes?

Can someone venture to drop-kick me in the proper direction?  By
chance is there a tutorial or a sample database that I can look at for
this?

Ed
Ed from AZ - 11 Jan 2008 20:09 GMT
Okay - I managed to cobble together a workable search and show.

The Add is giving me problems, though.  I got the
  DoCmd.GoToRecord acDataTable, "tabPartsInstl", acNewRec
in the button code, but I'm having difficulty finding the proper code
to gather my entered values and write them into the new record fields
of my table.  Any examples?

Ed

> I don't know if this is the correct approach, but this is the idea
> I've got:
[quoted text clipped - 28 lines]
>
> Ed
Ed from AZ - 11 Jan 2008 23:45 GMT
Found some ADO code, and it works.

Thanks to all who have posted on this NG and the various web sites.
That's where I have found everything.  You all are great for sharing.

Ed

> Okay - I managed to cobble together a workable search and show.
>
[quoted text clipped - 40 lines]
>
> - Show quoted text -
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.