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 / New Users / September 2005

Tip: Looking for answers? Try searching our database.

Adding Records to Hidden Form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DS - 24 Sep 2005 23:16 GMT
I need to add records to a subform on a hidden form, but I can't get the
subform to go to a new record.  The GOTO Control doesn't work because
it's hidden.  I tried Goto NewRecord,Forms!MainForm.Subform,acNewRecord
but that doesn't work either.
Thanks
DS
Duane Hookom - 25 Sep 2005 03:19 GMT
I would think you want to add records to a table, not a subform.

Signature

Duane Hookom
MS Access MVP

>I need to add records to a subform on a hidden form, but I can't get the
>subform to go to a new record.  The GOTO Control doesn't work because it's
>hidden.  I tried Goto NewRecord,Forms!MainForm.Subform,acNewRecord but that
>doesn't work either.
> Thanks
> DS
John Vinson - 25 Sep 2005 03:39 GMT
>I need to add records to a subform on a hidden form, but I can't get the
>subform to go to a new record.  The GOTO Control doesn't work because
>it's hidden.  I tried Goto NewRecord,Forms!MainForm.Subform,acNewRecord
>but that doesn't work either.
>Thanks
>DS

Records are not stored in Forms. They're stored in Tables.

To add records to a table (whether that table is bound to a visible
form, a hidden form, or no form at all) you can use an Append query,
or you can open a Recordset based on the form and use the AddNew
method.

                 John W. Vinson[MVP]    
DS - 25 Sep 2005 14:02 GMT
>>I need to add records to a subform on a hidden form, but I can't get the
>>subform to go to a new record.  The GOTO Control doesn't work because
[quoted text clipped - 11 lines]
>
>                   John W. Vinson[MVP]    
Thanks John,
How do yo run an Append Query from a listbox?
DS
John Vinson - 25 Sep 2005 20:53 GMT
>>                   John W. Vinson[MVP]    
>Thanks John,
>How do yo run an Append Query from a listbox?
>DS

There are a couple of ways; I'd recommend using VBA code in the
listbox's AfterUpdate event. Could you explain how the user will be
using the listbox, and where the new records should come from?

                 John W. Vinson[MVP]    
DS - 25 Sep 2005 23:13 GMT
>>>                  John W. Vinson[MVP]    
>>
[quoted text clipped - 7 lines]
>
>                   John W. Vinson[MVP]    
They will be picking products from a listbox that comes from a query
based on 4 Tables Menus, Items, SalesDetails and DiscountTypes the query
is called SalesDetailsQ.
Thanks
John
John Vinson - 26 Sep 2005 00:40 GMT
>They will be picking products from a listbox that comes from a query
>based on 4 Tables Menus, Items, SalesDetails and DiscountTypes the query
>is called SalesDetailsQ.
>Thanks

Sorry, but that doesn't help me much. What are you appending? To what
table? It SOUNDS like you may be storing a lot of data redundantly but
it's impossible to tell what you're trying to store, where you're
getting it, and where you want it stored.

                 John W. Vinson[MVP]    
DS - 26 Sep 2005 14:01 GMT
>>They will be picking products from a listbox that comes from a query
>>based on 4 Tables Menus, Items, SalesDetails and DiscountTypes the query
[quoted text clipped - 7 lines]
>
>                   John W. Vinson[MVP]    
I'm appending new orders with products to the salesdetails table.
DS
John Vinson - 26 Sep 2005 17:50 GMT
>>>They will be picking products from a listbox that comes from a query
>>>based on 4 Tables Menus, Items, SalesDetails and DiscountTypes the query
[quoted text clipped - 9 lines]
>I'm appending new orders with products to the salesdetails table.
>DS

Then create an Append query selecting the data from wherever it should
come from (which you haven't told me) to the appropriate fields in the
salesdetails table (which you haven't told me either), and execute the
query.

                 John W. Vinson[MVP]    
DS - 26 Sep 2005 17:56 GMT
>>>>They will be picking products from a listbox that comes from a query
>>>>based on 4 Tables Menus, Items, SalesDetails and DiscountTypes the query
[quoted text clipped - 17 lines]
>
>                   John W. Vinson[MVP]    
OK John, I've got it now...sometimes it takes a little pounding to get
through.  It probably came from the lack of understanding the append
query thing to begin with.  This won't work, what I need to do, or want
to do is add a new record to a query, not append.  I was hoping to use
this method instead of having a subform.  I thought I could just run SQL
from the listbox on click and add the new records to the Query.  Does
this make sense?
Thanks
DS
 
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



©2008 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.