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:
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?
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.
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.
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?
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.
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.
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?
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.
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
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.
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.
I have few forms for which I have created a navigation form. Now in this navigation form, I have 4 tabs/ forms. I want to disable other 3 tabs/ forms when either of the one is active. I want to restrict user from switching the tab leaving the task incomplete in one tab.
It should show a popup msg, that "the task is active. Please submit before leaving the page."
In a form is there a way to change sort order based on which field is active?
I'm using a Split Form which gives me the ability to sort by clicking on the header name ans selecting sort. This slowing things done since my workload is heavy.
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.
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?
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.
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...
I have created a database which has 2 images for record embedded, the method I have use for this is to link the address were the image is in order to avoid that the database gets slow, the images are displayed on the form but I cant find the way how to embed such images in a report neither how to print them with a button used for such purpose.
I have forms that are printed based on a query parameter of [enter item number]. There are several of these forms that I would like to print at one time (with one command) making it easier for the user to gather their information at the beginning of the day. I also don't want to lose the ability to print them out individually as we do now.
I have a Lost/Found property database which we use to keep record of the lost/found property and its working fine.
The database has one table and two forms.
One form (LostFoundForm) is visible to the user in which they enter data, this form has two sections; Item(s) & Finder's details and the second section is about Restoring details.
However the second form (ClaimReceiptForm) is hidden to the users (for manual data entry) and has only one section which is exactly the same as the first form's first section, i.e., Item(s) & Finder's details. This second form takes the data automatically from the first form because the table behind them is same and fields are same (please see attachment). Up to here it's all working fine.
I would like to introduce a Checkbox or a CommandButton in the LostFoundForm which when we click should pull up a msgbox asking "Do you want to print the receipt for this item(s)?" with a Yes/No option. On clicking "No" it should, obviously, settle down but on clicking "Yes" it should print the "corresponding record" from the ClaimReceiptForm.