473,324 Members | 2,417 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Print records from active forms

jpr
Hello, I have a problem with my database and need some help.

My database has a main menu named MENU which allows to access all the
different forms of the program I am trying to develop. One of these
forms is named MASTER and has its source to the main table of my db
also named MASTER. To open the form and add a new recorset I simple
press a button to which I have associate the following simple code:

DoCmd.OpenForm ("Master")
DoCmd.GoToRecord , , acNewRec

Once in the form and add the data I have to close it so that it can be
saved. I then go back to the MENU form and use a listbox to open the
selected record. The listbox its based on a query of table MASTER and
has a criteria (SSN) that allows me to open the record with the double
click event.

My problem is that I need to append my data into different tables and
do not know a method which would allow me to do this without having
first to close the active form (MASTER) and then running the append
queries. Is there a way this can be done?

What I am trying to do is:

- Write my data into the active form
- Append my data from the active form into different other tables
without having to close the form
- Still have my active form opened in my database so that I can open
another form (CHILD).

Please note that after that I have closed the form, I am currently
using this code to append the Master Table to the other tables:

If Not IsNull(DLookup("[SSN]", "child", "[SSN] = '" & Me!SSN & "'"))
Then
Forms("MENU").Visible = False
Else
If IsNull(DLookup("[SSN]", "child", "[SSN] = '" & Me!SSN & "'")) Then
DoCmd.OpenQuery ("AppendChild")
End If
End If
DoCmd.OpenForm ("Child")

This avoids having to save twice the same data.
Can anyone help me on this?

Thanks.

Mar 22 '06 #1
0 1671

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: DD | last post by:
I have a mainform with a subform. The main form as a dropdown box "chooseDate", in the afterupdate event i requery the subform so all records with the same date are viewed. Now i only want to...
2
by: Jason | last post by:
I have a table of 650,000 records associated to contracts. Some of the contracts have multiple records but each contract only has one Active Record (there might be several inactive records). ...
6
by: Paul T. Rong | last post by:
Dear all, Here is my problem: There is a table "products" in my access database, since some of the products are out of date and stopped manufacture, I would like to delete those PRODUCTS from...
12
by: MLH | last post by:
I have created two forms: frmBrowseNegsMainform and frmBrowseNegsSubform. I put a subform control on the first of these. The SourceObject property for the subform control is, of course,...
3
by: M.L. Abram | last post by:
Hello all, I do not know if this question is regarding table design, queries, or programming. Below, I have given a table design using Access 2003. Fields 'Product' and 'Color' are primary keys...
6
by: JonC | last post by:
I am developing an Access database and need to be able to print a form with various selections made as it appears on screen. The standard way of doing this would be to create a report based on the...
1
by: stalinkakinada | last post by:
I want to take printouts of 20000 records cards in which I need to print boths side. I prepared 2 forms(same table field are in 2 forms) each page gets 8 records . I printed one side , but when I...
1
by: kirkus84 | last post by:
I am currently trying to do a multiple record mail merge through a query via a command button on a form. The query basically displays customers who have said yes to privacy. The user inputs a date...
12
by: Studiotyphoon | last post by:
Hi, I have report which I need to print 3 times, but would like to have the following headings Customer Copy - Print 1 Accounts Copy - Print 2 File Copy -Print 3 I created a macro to...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.