Print Active Records On Form

Aug 28, 2006

Hello,

I am using a form to add data and would like to know if is possible to run a code via macro that allows me to print the records that are showing on the screen (I believe called the active records) without have first closed and saved the data.

Thank you.

View Replies


ADVERTISEMENT

Print Records From Active Forms

Mar 22, 2006

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.

View 4 Replies View Related

Yes / No Field When Active Print Text In A Report?

Apr 8, 2014

I've got a "Made in the USA" yes/no toggle field in my database. When I go to print out the info in a report, I'd like for the report to recognize whether I have a true/false condition, and print out "Made in the USA" where appropriate?

View 2 Replies View Related

Forms :: On Click Event To Print Active Record?

Jul 21, 2014

I have created a form to select multiple records for a transmittal report. I added a button to the form which I would like to open the report to view the current record. In the On Click event I added the following code:

Private Sub cmdPrint_Click()
Dim strWhere As String
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If
If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[TransmittalID] = """ & Me.[TBLTransmittal.TransmittalID] & """"
DoCmd.OpenReport "RPTDwgTransmittal", acViewPreview, , strWhere
End If
End Sub

The debugger keeps highlighting the row above shown in red. I've used this same code before on other forms and it worked but not sure why it isn't working this time. The only difference with this form and previous ones is that this form contains a multiple values combo checkbox (hope that's the correct term). The query that the report is based on changed the names of the field names so that TransmittalID on the form is TBLTransmittal.TransmittalID in the query.

I've tried the code with and without the extended name but each time the "Do.Cmd..." is highlighted.

View 11 Replies View Related

Active Records Between Two Dates

Mar 20, 2005

I am working on a project where I need to monitor employees who are on vacation. I would like to run a report that would show employees who are currently on vacation, and those that have already returned. This is the information that I am looking to get from the report.

Search Dates: Entered criteria thru qry, msg windows asks for "start date" and "end date".
1/01/05 - 1/31/05

tblName
John Smith

tblEmployee#
1234

tblDate left (on Vacation)
12/25/04

tblReturn Date
1/25/05

Days on Vacation
31

tblName
Tina Roberts

tblEmployee#
1243

tblDate left (on Vacation)
1/25/05

tblReturn Date (If the employee has not returned it would give the "end date" and calculate the days on vacation)
1/31/05

Days on Vacation
6

This may seem simple but I just can't get the qry to show dates beyond the "start date" and "end date". Only those records that start within the two dates.

Any help wpuld be greatly appreciated.

View 6 Replies View Related

Capture Active Records

Jan 12, 2007

Hello,

I have a form to add data. I have a cmdbutton to output a shapshot of a report via e-mail. I have noticed that the shapshot does not capture the data I have just entered on the active form unless I don't first close the form.

Is there a way I can capture these active records?

Thanks.

View 9 Replies View Related

Queries :: Records Active ON Or AFTER A Specific Date

Nov 26, 2014

I have a query from a table (to reduce the number of fields).The list is all the positions people have performed, as person could have one record another could have 10 the number is unlimited.

Fields are:-
-employee ID
-start date
-position

I need to find any records that were active ON or AFTER 01/09/2014. This will be 1 record for most but some could have multiple.I think it makes it more difficult that there is no END DATE.

View 6 Replies View Related

Modules & VBA :: Creating New Record Within Subform - Cannot Navigate To Other Active Records

May 4, 2015

I have a main form that controls 2 subforms. sbfActiveProjects displays a list of records that have not been flagged as complete. Upon clicking on a record in sbfActiveProjects, the details of that record show up in sbfProject. This functionality works great, except when I try to create a new record. The code works fine for getting a new record, however once I run the command I lose my ability to navigate to other active records.

Code:
Private Sub cmdNewProject_Click()
'set focus to sbfProject
sbfProject.SetFocus
'navigate to new record
DoCmd.GoToRecord , "", acNewRec
End Sub

View 2 Replies View Related

Queries :: Selects Active Records For Three Different Selections - Concatenate Query Results

Nov 3, 2014

I have a query that selects the "Active" records for three different selections, A, B or C.. There may be 1, 2 or 3 results for a particular selection. That is Selection A may have one result or active records, but Selection B may have three results.

I want to use data from the query to populate a field on a form. For example, if the results for Selection A, having one "Active" record would be RecordAData. But for Selection B with three "Active" records the result would be RecordBData & " " & RecordBData2 & " " & RecordBData3

My query is:
SELECT tblSomething.ID, tblSomething.D1, tblSomething.D2, tblSomething.D3, tblSomething.D4, tblSomething.D5, tblSomething.D6, [D3] & " " & [D4] & " " & [D5] & "-" & [D6] & " " & "SomeText" AS Header
FROM tblSomething
WHERE (((tblSomething.D1)=Forms!frmSomethingHeaders!D1) And ((tblSomething.D2)=True));

The concatenation in the query is labeled "Header". I want to be able to Concatenate the "Header" which in itself is a concatenation in the query.

I thought that this might be a looping through the query results, but I cannot figure out how to do it. But then, that is only my uneducated guess.

View 11 Replies View Related

Identifying The Active Form

Jan 17, 2006

Apologises if the answer is out there somewhere but I have searched to no avail.

I have a number of Forms which the user can jump around from one to the next. All the forms remain open with the form they are currently viewing showing on top. If they make a change on one particular form then when they return to a previously viewed form I want to disable or hide certain certain controls etc.

I know this would be simple to do on the on open command but as previously mentioned as I am not closing the forms after they are viewed, if the user returns to a previously opened form then this is not picked up.

Soooo, basically I'm after something like

When the user moves from one form to another already opened form for the new form to immediately know that it now has the focus and for it to do something along the lines of on open.

Any help will be appreciated

View 8 Replies View Related

Change The Active Record On The Form

Jun 23, 2007

hi
I want to set record selector on the form with a record number that I am founding it with this code:
Code:Dim con As ADODB.ConnectionDim cmd As ADODB.CommandDim rst As ADODB.RecordsetSet con = New ADODB.ConnectionSet cmd = New ADODB.CommandSet rst = New ADODB.Recordsetcon.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & CurrentProject.Path & "hazineh-bime.mdb" & ";Persist Security Info=False" cmd.CommandText = "select * from table1 where salp=" & Val(Trim(Form_mainhazineh.sal.Value)) & " and mahp=" & (Trim(Form_mainhazineh.mah.Value)) & " " Set cmd.ActiveConnection = con rst.Open cmd, , 1, adLockReadOnly If rst.RecordCount = 1 Then ' found the record else end if
I mean I want to change the active record on the form with another one .
how can I do it?

View 3 Replies View Related

Go To Last Active ID When Form Is Opened Or Refreshed

Sep 14, 2012

I have main form with everything on it using tabs and so on and everything is working fine. What I would like to do is this. Since I am jumping frequently between different records and many actions require main form to be reopened or refreshed and when this happens the form goes to random records, I would like for form to go to last record i was on before it was refreshed or opened.

I was thinking using tempVars to set the id but the problem is that I am not sure what can trigger the TempVars since I am jumping between the records and not making any changes to them.

View 3 Replies View Related

Command Which Closes Any On Screen Active Form

Apr 19, 2007

Need some help on a command which would close any on screen active form. I want to have this Esc key enabled as an autokey to close any screen active form. I know how this autokey thing works but unable to figure out proper code.

thanks

View 6 Replies View Related

Forms :: Form Active And Inactive Field

Aug 18, 2015

Field "A" is the drop list to select data like (Yes, No)

Field "B" is inactive but turn it to active when the field "A" is select to "Yes".

View 1 Replies View Related

Forms :: Format A Form When A Filter Is Active

Mar 13, 2015

I have a database with a filter on the form which users can apply I know at the bottom of the form it highlights it as filtered but I want something a bit more prominent displayed on the form when a filter is active.

View 5 Replies View Related

Active / Live View Of PDF File In A Form

Aug 18, 2014

I have a table with 4 Fields:

Drawing Number
File Link

Attachments
Description

I basically want to have a live preview window of the "File Link" attachment in that current record. I have heard it's best to use a Web Browser Control when doing this, but I cannot get it to display the currently attached pdf file in that field of that record.

Is there a way to edit the link properties of the Web Browser Control so that it dynamically detects. The file location of the attached file in that field? There will only ever be one attachment in that field, as this will be a live pdf view of the drawing to which that drawing number was assigned

View 1 Replies View Related

Forms :: Finding Previous Active Control On A Form

Mar 2, 2015

I have a form where the user clicks a button (button 1) to open a modal form, the user then enters data into this form and clicks close.

Then back in the first form I need to find which control had focus before (button 1) was clicked.

Screen.PreviousControl returns a control on the modal form.

I hope its easy like Forms!FirstForm.PreviousControl but I can't seem to find it!

View 2 Replies View Related

Modules & VBA :: Only Refresh Specific List Control Box That Is Active In Form

Jan 28, 2014

Essentially I have a form_A with several tab's and then one list control box in each of those tabs. At present if you double click on any item within the control boxes your taken to another form_B with info about that item and when you close that from down again if refreshes form_A.

Is it possible to only refresh the specific list control box that is active instead of refreshing the whole form ?

View 4 Replies View Related

Don't Print Selected Records

Jul 23, 2007

Hi,

I have recently learned the use of 'ysnprint' (I am a novice), but wondered if there was an a way of selecting individual adresses in my db to exclude from the full address label printing.

Thanks for any help

Adrian

View 3 Replies View Related

Modules & VBA :: Connect Datasheet Form To Active Directory Search Results

Jul 31, 2013

I'm trying to tie a from into the results from and AD Query. I'm not that experienced with doing this kind of thing so I may be going about this the wrong way. Anyway here's what I've got so far:

Code:
Private Sub Form_Open(Cancel As Integer)
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Set cn = New ADODB.Connection
With cn
.ConnectionString = "Provider=ADSDSOObject;Trusted_Connection=yes;"

[Code] .....

When stepping through the code, it all goes well until it hits the line that actually connects it to the form "Set Me.Recordset = rs".

When this line is executed, Access crashes and attempts to restart.

PS: Access 2010, Win7 64bit

View 5 Replies View Related

Recommend A Tutorial To Print Records Please?

Mar 8, 2007

Hi,
I'm using Access 2000.
I currently use a form to enter my customer details. As soon as the info is entered I need to send out a "thank you for joining" letter, but I can't figure out how to print out a single field, it prints them all.

Ideally I'd like to have a button on the form so I can print it out on a template.

Can anyone recommend a good tutorial on how to do this, or offer any advice please?

Any help would be greatly appreciated!

Many thanks

View 7 Replies View Related

Print Records Selected In REPORT

Jun 2, 2005

I need print records selected in a REPORT, of continuos forms. this is example

http://www.mundoimei.com/Images/form.JPG


please help me!!! :confused: :confused:

View 5 Replies View Related

Modules & VBA :: Count Number Of Times Mouse Left-clicks On Active Form

Jun 14, 2013

I would like to update a txtbox with a simple int count of the number of times a mouse is left-clicked while on an active form. How do I do this?

View 5 Replies View Related

How Do I Print The Total Entered In Fields Of Records

Nov 7, 2007

I have a database for police officers to enter their daily activity. For example on arrests, Date:_____ Drugs____DUI___

The officers enter the date and the total number arrested for each charge. I want to print a monthly report. How do I make the report print this information for a specific date range? The way I have it now, it asks for the startdate and enddate, but it still totals every record, not just the date range.

View 14 Replies View Related

Forms :: Using Check Box To Select Records To Print

Jun 23, 2015

I have a form open, but want to print only specific fields in each record. Been trying lots of filtering methods to no avail as I am a novice at filtering.

I can filter records, but cant figure out how to filter specific fields from those records.

My project goes something like this:

Each record in my form consists of listed items like on an invoice. However, not all the items on any given invoice will be printed. Therefore, I set up checkboxes beside each line, so for each invoice, I only tick the items I want to be printed from that invoice. However, I just cannot yet find a way to print the selected items.

View 7 Replies View Related

Reports :: Duplicate Records In Print Preview

May 7, 2014

I have a small database for some data collection having One main Table and then sub Tables, then Main form and sub form then Main Report and sub Reports forms.

For each main records there are several sub records in sub tables. Now the problem is that when i Print Preview the report so i see repeatation/ duplicate of the records; while if any record have only one record so that don't have any duplicate.

Now how to stop duplicate due to the subtable in Reports

If my above statement is not clear so i can attach the database...

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved