I have a Yes/No field for Tax in my table. Records that have this field checked will have 5% of tax added to its total cost. I did a DLookup on the On_Current event of the form and it does not work. My code is as follows,
I have a form that when a user fills out the information and select a submit button. It brings up that record in reports in print preview for them to print. The issue i am having when the user enter the information, the report does not show any data until i refresh it. I tried include me.refresh,etc. No luck. I attached the code to make things simpler.
Private Sub Form_BeforeUpdate(Cancel As Integer) If Me.Dirty Then If MsgBox("Do you want to Submit this Contract Form? Clicking No will DELETE ALL ENTERIES,and Log You Off", vbYesNo, "CONTRACT FORM") = vbNo Then Me.Undo Cancel = True Else If MsgBox("PRINT FORM", vbOKOnly, "CONTRACT PRINT") = vbOK Then DoCmd.OpenReport "rpt_Contracts_Main", acViewReport, , "[CONTRACT_ID]=" & Me!CONTRACT_ID End If End If End If End Sub
The reports comes up, but i have to manually refresh it to show the data that was enter.
I am new to Access and I am trying to make a Database. However, I have an attachment with each record and I would like to know if there is a way of making a button/link that will allow the user to navigate from each record to its respective attachment.
I have a purchase order form that has a checkbox to determine if it has been approved. If it has been approved, btnApprove and btnReject are hidden and if not, they are shown. However, subsequent unapproved records after the first approved record do not show out the two buttons as they are not 'refreshed'. How do I write the code for it to display the btns based on the individual records? I have attached a small db for easier understanding of my prob.
Note: FrmLookupRecords is the form I'm talking about.Record 1 has been approved but not record 2.
I have a form in which I have a combobox. The code in the row source is:
Code: SELECT [tblBooks].AuthorFirst & " " & [tblBooks].AuthorLast AS Expr1 FROM tblBooks GROUP BY tblBooks.AuthorLast, tblBooks.AuthorFirst HAVING (((tblBooks.AuthorFirst & " " & tblBooks.AuthorLast)<>"") And ((Count(*))>1)) ORDER BY tblBooks.AuthorLast, tblBooks.AuthorFirst;
This is an unbound box.
The rest of the form contains bound textboxes and other bound comboboxes.
This form is processed by the following VBA code:
Code: Private Sub cmdAddBook_Click() 'Place the authors first and last name in an array splitAuthor = Split(cboAuthor.Value, " ") 'Create a new record with the form information DoCmd.GoToRecord , , acNewRec
[Code] ....
What happens is that it places all the records (Except those in the array) in a field and overwrites the values in that field.
I have used the same GoToRecord statement on other databases and it works just fine. I suspect that it is due to the unbound combobox.
What I need to find a way to place all the data in the corresponding fields of a new record including separating the author's first and last name when retrieved from the combobox. I just need to figure out how to get the data in the table somehow.
Ok heres the situation, I have one form(frmBikes) that i use to filter the results in a subform(frmSubBikes). From the main form i have a button which opens another form(frmSell) which allows me to enter the sold price and when "cmdSell" is pressed many delete and append queries are run on the data stored in (frmSubBikes). When this button is pressd the deleted record has #deleted in each field where as it should be gone and i get this error message. (The expression you entered refers to an object that is closed or does not exist) What do i need to change? my minds been off this project for ages now ive got a brain block so help would be appreciated.
this is the code for "cmdSell"
If MsgBox("You are about to complte selling transaction: " & r & ". " & Chr(13) & " Is that correct ? ", vbQuestion + vbYesNo, " User Accounts") = vbYes Then
I am trying to capture a newly arrived mail in outlook with respective subject line. The below code works for me on 2010 outlook but when new mail arrive in outlook 2013 ,Mrthod Items_ItemAdd do not get called.
Code:
Option Explicit Private WithEvents Items As Outlook.Items Private Sub Application_Startup() Dim olApp As Outlook.Application Dim objNS As Outlook.NameSpace Set olApp = Outlook.Application Set objNS = olApp.GetNamespace("MAPI") ' (1) default Inbox
I have been trying to figure out how to make a form refresh after deleting a record in a subform. The code in the combo box that populates the subform works fine. If you select the "Action" of "sign" from the unbound combo box above the subform, it places "Sign" in the the subform and then makes a checkbox on the main form [WillTake] = True.
But when I delete the record by right clicking on the entry, the focus is sent back to the main form so I can refresh the form and thus update the [WillTake] checkbox. I have tried just about everything. I can get the focus to a field on the form, but I cannot figure out how to refresh or requery the form.
The code to transfer focus is on the OnDelete of the subform.
I have two subforms on a "Page"/Tabs. Subform #1 is a continuous form which accepts data about dimensions of a pattern piece. The other subform needs to update its information display each time the last control of the first subform loses focus, because it tells me how much material is required for all pieces of this pattern that are entered.
My first feeble attempt at this was to add the following code to the "Lost Focus" event of the final control on the first subform: Form.Parent.Refresh
This succeeded in forcing the second subform to re-run its calculation.
However, after the recalculation took place, I wasn't able to move to the next record on the first subform. This subform is a continuous form, and I need to be able to add another row of data and then see the second subform change based on the additional information in the first subform.
i want to be able to create an On Click Event when pushing a command button that will run an Update query to update a record and after it has been updated that specific record will pop up on a Form and be displayed. i know a different way is to run the Update query and then have it displayed in a Select query but i want it to be displayed on a Form instead. is it possible?
I have a form which contains one subform. On the subform I have a command button which saves the record just entered. On the main form I have a "refresh form data" button which updates the main form so that the calculated controls can show the correct results based on the data just entered?
Can anyone tell me how I can get the "save record" button in the subform to subsequently refresh the data in the main form as well, thus saving a button???
I have a main form where information for a particular part number or job is entered. Should the part number not yet exist, Access will let you know. I have a button within the main form that opens up the Form_EnterPartNumber form which allows you to enter the new part number.
What I would hope to be able to do would be to refresh (requery?) the main form after creating a new part number and closing the Form_EnterPartNumber form..........but, keep the main form on the current record instead of resetting back to record number 1.
First of all hi everyone, im lookin for some advice
i have database setup with record level locking for multiple users (havent decided weather its should be optimstic or pesimistic yet)
however either way i set this there is no idication that the record is opened/locked by another user is there an easy way to say pop up a msgbox when a user enters a record to say this is in use/locked and show who by using the username?
I am creating a query based on two tables: 1) tblClient (only one primary key "ClientID") and 2) tblContactDate (with two primary keys "ClientID" and "ContactDate").
Each client may have more than one contact date.
In the query, I only want the records from the tblContactDate showing for the MOST RECENT contact date of the client only; however, right now the query is producing more than one record for those clients with more than one contact date.
Not sure if I need add some special code to the "criteria" area in the Design View, or somewhere else. Your help is appreciated. :confused:
I need to write a query that includes the values of 2 fields from the following record. e.g
index Name Total Name2 Total2 1 Dave 8 Steve 4 2 Steve 4 Mike 6 3 Mike 6 Pete 4 4 Pete 4
I can get a partial success when I use the DLOOKUP function along with a sequential indexed field but I am working with 10,000s of records and any subsequent query based on the results of this takes an absolute age to run.
I have a "problem" in my database. I have a form, as you can see in the attachment. On that form I can choose different installations to which a spare part belongs to, but in that same list of installations it always shows a name of the first installation in the dropdown list. (a default record) This can cause some confussion, because you see the name in the list, although it doesn't belong there.
How can I fix this?
PS : If I'm not clear about my problem, pls say so, my English is not may native language.
I was having trouble adding my records to my subform. I think it was going into my main form, which is unbound. When I removed the navigation bars from my main form and added them back to my subform, I lost my records that i had. They are still in my table, but not showing in my subform. How do I get them in there?
hi, can anyone help me? i have created a database for the use of a distribution centre which consists of order details and other information. the main idea is for the system to show the next order listed automatically to the user. i have a table of new order details. each order can be one of three either completed, pending or awaiting delivery. so i want the system to automatically clear the completed ones for the user and for the next order details which are pending or awaiting delivery to be shown. how can i do this?
my table entries are reciept(primary key),name,reciever,address,amount...i want a query to show recently updated entry in table i.e only last entry from table
I am new to access database . I am trying to create a database for my stamp collection. I have created a table and no I want to have a picture of the stamp show in a report. I followed the instructions about creating a field that will be OLE object aware. But when I insert the path to the photo nothing comes up in the photo space. except the name of the path. I tried .gif .jpg .tif files none work.