Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Copy filtered subform into exist table

Posted on 2013-06-20
16
Medium Priority
?
490 Views
Last Modified: 2014-05-14
Hi Experts:}
I have a main for with 2 datasheets linked subforms (see image attached)
I need to click a button that copy the filtered subform with it`s second linked subform into a related table.
the first subform to-> tblQuery1Log and the second subfrom (with the + ) in the image
to table TempCellProp

how can i peform that in vba?
0
Comment
Question by:drtopserv
  • 9
  • 5
14 Comments
 

Author Comment

by:drtopserv
ID: 39264047
0
 
LVL 40

Accepted Solution

by:
Vadim Rapp earned 2000 total points
ID: 39265812
See attached sample. Create necessary sql statements so they include the fields you want, from both subforms, and put them in right tables.
db.mdb
0
 

Author Comment

by:drtopserv
ID: 39266260
vadimrapp1, thnx alot.
but still can`t perform it in my sample4, may a help:
I need to put the result from the screenshot sample data into the tables:
tblQuery1Log AND TempCellProp
sample4.accdb
sample4.gif
0
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 

Author Comment

by:drtopserv
ID: 39266261
If u can notice, the subform has another nested subform (both are datasheet) that need to be copied to the related temp tables.
0
 
LVL 40

Assisted Solution

by:Vadim Rapp
Vadim Rapp earned 2000 total points
ID: 39266328
What I uploaded is just a sample that shows what to do. Apply it to your case. My Access is 2003, so I can't open accdb files.

If subform has another subform, reach out to its recordset in the similar way to how it's done in the sample to the first subform. Once you have the recordset, apply the same filter as on the subform, then scroll the records.
0
 

Author Comment

by:drtopserv
ID: 39267207
in the sample i gave there is 21 field in the 1 subform and 6 fields in the 2 subform.
it means from ur sample i have to write line to include each field name from the 1 & 2 subform and inject them into the related table, which i think it tiring to do it!
do u have any simple solution for that:}?
0
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 39267311
> it means from ur sample i have to write line to include each field name from the 1 & 2 subform and inject them into the related table, which i think it tiring to do it!

Well, if writing INSERT statement with 21 fields is too boring, here are your two choices:

1. come up with creative code that will enumerate the fields in the subforms, and dynamically concatenate the INSERT statement

2. hiring someone who will do this project for you; use thus saved time to consider another career, in an area less boring than programming.
0
 

Author Comment

by:drtopserv
ID: 39267324
Well bro,
I`m not sure that you were born programmer, also I`m sure that your first program was a creative code, I have purchased books around that started to help me out in access programming, this chan just help me out got into the goal faster.
anyway these lines doesn`t mean that i`m not appetiate your efforts(time) answering me and help out.
try to be in my side, remember the beginning time when u start programming, and the needs of the push :}
0
 

Author Comment

by:drtopserv
ID: 39267327
anyway, your sample could help me around, i can  keep from there. i think you deside the points. :}
0
 

Author Comment

by:drtopserv
ID: 39267330
deside=deserve
0
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 39267340
> also I`m sure that your first program was a creative code

Not too creative. It was a deck of punch cards, about 100. Occasionally they were dropped on the floor, and had to be collected back into the deck, in the right order. See what I mean?

:-)
0
 

Author Comment

by:drtopserv
ID: 39267345
sorry my eng is not that strong:} didn`t understand you:}
0
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 39267417
This is how my first program looked like:First Program
0
 

Author Comment

by:drtopserv
ID: 39267552
Real iNsane!!
wow, you have struggled enough to "BE" :}}}
"Don`t let ppl go the same way you go,,relief a bit:} /save them:}} "
0

Featured Post

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
What we learned in Webroot's webinar on multi-vector protection.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question