Hey all, I am wondering if there is a way to copy and past a control from a FORM to a REPORT? I have an activex control for my digital signatures and for some reason the value is not showing up on my report, I have tryed several different ways and I was wondering if there was a way to copy the activex control and on the open of the report the value what was copyed would appear on the report. can this be done?
I believe that somehow the value is not staying in the field provided and just going directly to the table therefore I cant see it on the report. Is this possible? Thanks in advance
I am trying to create a customizable report that would allow the users to choose fields. I have a pretty common code that I found online and adapted it, but it fails on the first SetReportControl function.
The error reads: Run-time error 2465: Application-defined or object-defined error
Could it be something as simple as an incorrect reference? I have checked multiple times, but I am stumped.
Code: Option Compare Database Option Explicit Sub MakeReport()
[Code].....
This is a trial run, in the end I need to be able to open a report, then adjust the Report controls within 1 or more subreports inside the main report. That is a battle for another day.
i have created a module under module section of my DB My Report Name : "PURCH VB Query"
the code is as follows : (what is want tell you later..)
Code:
Sub Erlick() DoCmd.SelectObject acReport, "PURCH VB Query", True '"PURCH VB Query", acViewPreview, "PURCH VB Query" For i = 1 To 3 DoCmd.PrintOut acPrintAll, , , , i Next i
'This is for creating Seperate Text Per Copy in RptHeader Preview End Sub
i've placed a TextBox in my report named Text25 to the value : =+1 properties-->data-->running sum--> Set to OVer all
i've also set a textbox in my report named CpyWord to the value : =IIf([Text25]=1,"Original Buyer Copy", IIf([Text25]=2,"Duplicate File copy",))
Now what is want is Three Copies of Report with Two copies marked seperately as per above IIF statement
As i want Three Copies with each Rpt-header as Different Text
Possible solutions (ba donna no a script) How do i refer to Report's control after Docmd.SelectObj.... if any facility then i can do easily thru the dazzling for next loop How do i increase Report's control Text25's value, if three copies r there I know there are many events in Report
I've stucked over this point. My all App in db is ready
I have form named home page in this homepage form in the form header i have inserted some fields from some tables like province, district, community etc. these fields are unbound and are used for filtering purposes, when i select a province all districts related to that province displayed and when i select a a district all related communities displayed, there is a one to many relationship between district table and community table,
What I want is, when i select a district on the form header(it is unbound as i explained before) of this homepage form, the DistrictID should appear in community subform under DistrictID(as there is a one to many relationship between district and community) .
For more clarification find the snap shot attached...
I am a beginner and I am having difficulty doing the following.
I have created a form from a query, (by agent)
The form took a little while to design, and I know how to copy the form, but how do you change the agent that is being referenced without having to go create the whole form layout again.
What I'm trying to accomplish is some sort of 'Order Confirmation' (filled with the info i have entered in my order form and sub_form fields) that i can copy and paste as a reply to their email-order.
I have taken 2 failed approaches so far:
1) I used a report to display the info
Private Sub Command103_Click() DoCmd.OpenReport "Order Confirmed", acViewReport, , "OrderID = " & Me!OrderID End Sub
This worked fine until the information was copied and pasted into outlook which upon doing so changed the column titles and layout
2) I used another form with a text box to fill with the data entered on the Order form
The answer is probably in here, but I can't find it... so I have two questions.
1) On a form, I have a field with Company Legal Name and Company Trade Name, most cases the company trade name is the same as the legal name. So what I would like to do, is add a button next to the Company Trade Name field so when clicked it would automatically copy the text data from legal name to trade name.
2) Same scenario as above but with mailing and shipping address if it is the same.
I have a form on which I have asubform. This form is based on a query. I would like the user to be able to add/and update information from excel to this form. When I try to copy from Excel and paste them or try to overwrite the eisting data, I get the following error: " You cannot add or change a record because a realted record is required in tabel "benchmark".
Can anybody tell me how to fix this? thank u.. Stacey
I have got a form with our company's representives. This form has a subform with clients certain representives aren't allowed t contact. I would like to have a 2nd sub report with all the customers listed and their addresses with the ability to highlight one or many customers, click a button and have the customer IDs and names update to the first subform. Has anyone done anything like this?
I am currently creating a database which stores customer details and booking details.
I have the following tables: Customers and Reservations, both of which are linked by the CustomerID field.
The customer form automatically assigns a CustomerID when you enter data, however I then want the CustomerID to be copied on to the reservations form aswell. Also, the reservations form is a new form and not a subform.
How do I copy a form from one database that have reports and quaries linked to it to another so that I can change the information in the new database and keep the form style in the old database?
I'm trying to continue with my rebuild of our call answering screen. It's basically a form with a button for each company we represent, clicking the button will lead to a call answering screen for the company. we also have software that pops the correct screen when we receive a call for the corresponding company.
I'm trying to get some of the fields to autopopulate, starting with the telephone number of the caller. the number appears in a text box on the main form and I'm trying to copy it into the caller telephone box on the call answering form. I've got code in place but it gives me the error "you can't reference a property or method for a control unless the control has the focus". Here's the code for the form I'm working on...
Code: Option Compare Database Private Sub cmd_recordcomplete_Click() DoCmd.RunCommand acCmdSaveRecord DoCmd.Close acForm, Me.Name End Sub Private Sub Form_Load() DoCmd.GoToRecord , , acNewRec txt_dateandtime.Value = Now Me.txt_callertelephone.Text = Forms!Switchboard!txt_incoming.Text End Sub
I exported two new forms I created to 2nd database and for some reason ALL the forms I had in the 2nd database were deleted!!! I don't understand why this happened because I have done this before and the forms in my 2nd database were never deleted.How can I get the forms I had in my 2nd database back??
Ok, I'd like to appologise first as I wasn't sure that this question/problem would fit appropriately into the "Forms" forum, and also for the length of this post.
In the database I'm currently building, I have a form that is used for adding new product purchases for a given customer. So far, after much googleing and and head racking, I've managed to get everything in working order, save this one problem I can't solve.
The form uses the following SQL to populate its field list;
SELECT Products.*, [Expense Codes].[Montant de Paquet] FROM [Expense Codes] INNER JOIN Products ON [Expense Codes].[Expense Code ID]=Products.[Expense Code ID] WHERE (((Products.[Commencez Date])>=Date()));
Sorry for the french text, this is for use by a French company
On the form I have a combo box that lists the product packages available (combo 1 for reference), Prod 1, Prod 2 and Prod 3. This is a field in the products table which is linked to a seperate table called Expence Codes. This table holds my master list of product codes, and their off the shelf price in a field called 'price'. By using the above SQL, I have the price field ("field 1" for reference) on my form auto update when ever the value combo 1 changes. This is working as I would like it to.
Now for the issue I'm having. I would like to take the value from field 1 to be copied to a field in my payments table, this is to facilitate a final billing value being correctly calculated and invoice being created. However, I'm at a loss as to how to acomplish this.
I have thought of using an update query to add this information to the payments table, as the relivent record will already be created, but Im not sure if this is the right way to go. So any ideas on what I'm doing wrong, could do better or need to do are more than welcome.
Thanks for reading this far and I await any replies :)
I have a list of about 200 crops on a column, and for each crop I have 6 information (income, amount of land, season, etc.) in the following 6 columns. I have this information for about 100 households in 6 villages.
I am now starting to put these info in the computer, and it is an enourmous task. I thought that one way to do it is design a form in Access, and have one file per village. I then want to analyse the data at the household level for each village, and also analyse the data at the village level (after calculating village averages).
I want to recreate the form I used to interview farmers in Access, but I can't figure out how to make Access automatelly have 7 columns in form view (the first with the name of the crop, the next 6 with the information: income, etc.). The idea is to reproduce as closely as possible the form I used to interview the farmers, so as to facilitate the data-entry.
Does anybody know how to let Access automatically sort all the fields into 7 columns? Of course I can design the form manually (putting each field individually in its right place), but then I have 7 x200 fields to move, and it would take a huge amount of time. I can't believe that Access can't do this automatically, but I can't figure out how.
I then plan to transfer the info for analysis to SPSS. Does anybody foresee a problem?
Do I make sense? If anybody can help, I would be very grateful. This is actually very urgent, because I am going to pay somebody to do it, but I have to tell her how to do it over the week-end. Thank you very much!!
is there an easy way to copy the current record on a form when clicking a command button such that a snapshot of that record is copied to a table for archiving purposes?
the table has about 120 columns so it is cumbersome to write an Insert Into sql statement within VBA code.
what i am attempting should be quite straightforward...i just want to take the current record in its entirety that is from a single table and append it to another table of the same structure.
I have an old form (see oldform pics) and a new form (see newform pics). The old form has controls on it which work just dandy (well, at least they display and store information). The new, tabbed, form however does not. What's up with that? I simply created a form, created a tab control, went to my old form in design view, selected some objects, right-clicked-copy, went back to the new tabbed form, right-clicked-paste somewhere in the middle on the tab control, and... Presto! Nothing.... Just #Name?
Strange thing is, when I create the control, for example InitialCall, myself or using the wizard, the #Name? disappears, so then it works like it should.
What's going on? I need to do this for a bunch of controls.... and I would hate to have to do them all 140+ all over again by hand.... copy/paste would be so nice..... :)
I have a main form with a field "Calibration Date" which shows the latest calibration date of a specific item. I have a subform that has a field "Cal Date" that is the latest calibration of this specific Item. In the Subform there may be multipul "Cal Date" enteries for that specific item but in the main form I want the "Calibration Date" to update to the newests Cal Date enetered into the subform.
how to make my form controls change size / position as my form is resized / loaded on a computer with a different resolution. Several of the tutorials out there suggest putting code on the "on resize" property of the form. When I looked at the Northwind database to try to mimic their code however, it looks like they must be doing something different as there is no on resize code under the form properties and I was unable to find the code they do use.
I am trying to open a form in design mode and add controls, this i have done. I am doing this all in a class, and am having trouble saving the modified form.
I have tried using the following, both produce errors
Recently I designed a form with several controls including both TextBox and Combox. Before I submit data by clicking the button, I use VBA to validate the values of those controls (textbox and combox). If the value is not valid, the system will eject a msgbox and automatically set the focus on that component. In order to tidy the code, I use a GoTo statement, which refers to a group of code to display the message due to the value of parameters
But it seems VBA doesn't recongize the control I set through the parameter.
The code as the following:
private function validation () as boolean
Dim ErrorMessage as string Dim ErrorComponent as String
...... ErrorMessage="Please select the shop Name" ErrorComponent="ShopName" // ShopNameis a combox
GoTo ExitFunction .....
...... ErrorMessage="Please set the start date" ErrorComponent="StartDate" // StartDate is a Textbox GoTo ExitFunction .....
As I tested for seveal time, I'm sure there is something wrong with " msgResult = MsgBox(ErrorMessage, vbOKOnly, "Error Message") Me(ErrorComponent).SetFocus "
I have searched the forum on this, but I can't find an example of this problem.
I have a data entry form with a two-page tab control. One is for company info and the other for contact info. The recordsource is a query based on the two tables. Initially I had the page set up as a rather large form with a subform and decided to convert to the cleaner looking tab control (I used copy and paste to transfer the controls).
This form worked initially, but now I have changed some setting so that it doesn't work anymore: I can enter data properly on the first tab, but not on the second.
I have tried changing the various form properties but I must be missing something obvious. All my tab-less forms work the way I expect them to.
What I don't understand is why one tab works and not the other.
I would like to create text boxes using VBA code ....the reason is that I need a number of text boxes to be created that is equal to the number of rows that is generated by an SQL query.
How do you hide the canned record scrolling keys on the bottom of a Form? I have placed my own controls and do not need them to confuse the Operator, or cause problems.
I created lots of controls on my form, and now i cannot create anymore. I do not know what the problem is... I just get an error message that says:
"MS Office Access cannot create any more controls in your form/report. If you have deleted controls from this form/report in the past, try renaming the form/report and then add more controls to it"
I tried renaming the form already. it didnt work :confused:
I tried to create a new database (i copied all the tables, queries and forms into the new database). it didnt work.
I dont know what else to do... Please help I would dearly appreciate any help. Thank you in advance :)