I have a form that computes a very extensive calculation based on inputs which are all saved in a table (declared by Control Source) by a unique identifier.
I export this data into Excel and reformat with a macro. I lose the formatting of the form.
I found that with the form active, I can print this form. The print includes multiple form copies for each record in the table and I do not see this being very user friendly.
I investigated online and see the typical workaround would be to print the unique record based on a report, though I would again lose the layout of the form.
My question would be, if I create a copy of the table I am storing my data in (as to capture all columns I am currently using on the original table) and maybe even the form I desire to print, could I have an on-click procedure that would save only the current record and all its inputs to the "PrintTable", and be able to print only the current record, then after it prints clear the table of any records?
Providing answer as unable to comment.
Can you not recreate the form as a report? Forms are not designed to be printed, however Reports are specifically designed for this purpose. And you can pass through criteria onto a report. And have virtually the same sort of design as you can put on a form.
Creating a duplicate table just to overcome the issue you are facing flies in the face of normalisation techniques, and should absolutely be avoided at all costs.
Related
I am rather new to coding an Access Application and I have a rather strange error I do not seem to be able to resolve.
I have multiple Forms which are used to write data to some tables. Basically one Form per table.
Mostly the forms are just used to show a selection of the data in the tables. To make sure that noone accidentally alters some data you have to press the button "alter" first, which unlocks the fields to alter the dataset. In one form, however, when you ppress the alter button it switches the dataset. I have one column which is an automated ID which serves as a primary key to distinguish the data from one another.
So when I am debugging the issue and print this ID (Debug.Print Forms(formName).Controls("ID")) it returns the ID of the data that I want to alter, but as soon as I access the data and change one field (Forms(formName).Controls("Column1") = "foo") and print the ID again the ID switched to a completely different dataset.
I have absolutely no clue how that could happen. There is no other code being processed in between. I have googled for multiple hours but have not found anything in this regard yet. Maybe I am just using not the right keywords.
Any help is highly appreciated.
Thanks in advance :)
I have a form that a user will input data into, which will then send the added record to the backend of the database (I split the database so that the frontend is accessible to users while the backend is hidden). The frontend also includes a query with no filters, so that it will full portray the backend. This way, users can either input data via the form one record at a time, or add multiple records to the query (and therefore the backend) by copy/pasting from an excel sheet with a specified format (so that the data will be pasted in the same order as the fields of the query).
I want the user to not be able to edit the data/record once it is submitted, but I still want them to be able to view it in the query and/or paste multiple records in the "(New)" record row. Is there a way to make all entered records "read only" per se, but still have the ability to enter new data (i.e. make user unable to edit previous records, but be able to add new records)?
I used this forum as a reference, but the only solution I've come up with was to make the Recordset Type "Snapshot", which does all that I want, except it disables the ability to add a new record.
https://answers.microsoft.com/en-us/msoffice/forum/all/lock-the-entire-record-once-certain-textboxes-have/24f53c0a-2435-48b2-bf91-6713ff8b60ee
I've searched far and wide, but unfortunately haven't come up with anything. Any help would be greatly appreciated. Thank you!
I am new to using the front end tools/VBA in access, but I am an advanced programmer.
I have a situation where I need to record the date, and method of commute, for a particular individual on a monthly basis. What I have done so far is programatically create a form that lists every day of the month and has a blank space next to it for the user to enter in how he commuted. User only has to fill in if he/she clean commuted. The question is, how do I:
1. Select Records that have already been entered for a month and populate them to a line on my form.
2. Show a blank space for a user to enter info on any date that is not associated with a record.
3. Update any records they changed.
4. Append any new records they enter in the blanks.
I need to do this all on one form so it is easy. I cannot ask the users to navigate.
I appreciate any suggestion that might lead me to a solution. Many thanks.
A standard bound form will do that.
Use the wizard to get started and specify your table as the source.
After much testing and working (strange not find examples of this), I have determined the way to do this.
Do not programmatically create the form.
a. Forms in Access are tied so closely to accesses "form binding" functionality that there are to many limitations trying to work with a programmatically created form. It's very difficult to do.
A better solution is to programmatically create a temporary table that has the correct data structure and bind the form to that temp table.
a. thus the only programmatic part of your form is setting the bindings. Once that is done, you can rely on the form binding in Access to work easily with your Select, Update, and Append functions.
My Access form has a list box that displays files the user has selected from an OpenFile dialog box. What I do is copy these list box files into a seperate folder on the network and I save this network path in a tblAttachments table. This table has a one-to-many relationship with my main table - tblIdeaDetails.
I created a query that selects records from the tblAttachments table:
SELECT tblAttachments.attachmentPath, tblAttachments.attachmentIdeaID
FROM tblAttachments
WHERE (((tblAttachments.attachmentIdeaID)=[Forms]![frmIdeaSubmission]![ideaID]));
My question is, how can I display the results of this query in that same list box when the user is navigating through the records (frmIdeaSubmission in this case, which is bound to the tblIdeaDetails table)? I've tried doing a requery, but I kept getting an "Out of stack" error.
There isn't a lot of information to go on with your question but let me see if I can help anyhow.
My suggestion is to isolate your problem and work it out before incorporating it into your project. Create a new access database and make a 'demo' of what you are trying to accomplish.
The reason I'm suggesting this is because an 'Out of Stack' error is memory related - could be related to database corruption - a whole myriad of reasons.
Microsoft Support lists a few reasons:
http://msdn.microsoft.com/en-us/library/aa264523(v=vs.60).aspx
As identified by the support page, it can be dependent upon a number of factors that are going to be present throughout the database.
All things being equal, if you have your listbox recordsource bound to the query you indicated - calling the requery method on the listbox object should do the trick. Changing the record should also force a requery if its bound to a data source.
I have an Acrobat form for work that our salesmen use to create proposals for jobs and their corresponding estimates.
The problem I am facing is that the form only stores data for one customer at a time. I am trying to get it to where they can type in a customers name (or job number, etc.) and it pull up all the form data used for that customer when that exact estimate was done (no matter how long ago it was).
How can I get my PDF form to do this (save current and all previous inputs) and not just save the current data in each editable field at a time?
I currently use Omniform and it does all of this; however, we are trying to switch over to Adobe and I am not too familiar with the software and how I can accomplish this!
Thank you in advance!
If you want to do all the processing local (without server roundtrip) you would have to embed all data in the PDF itself. There are several ways to do this but I would recommend using JavaScript. You would declare this at the document level. You would handle the blur event of the customer name (or other key field), find a match among the multiple customers and populate the secondary fields.
Assuming the data sits somewhere in a database, you would have to generate such a PDF or manipulate an existing template programmatically using a library. Not sure if you are looking to a programming solution or a tool.
Here is more info on JavaScript for Acrobat:
http://www.adobe.com/devnet/acrobat/javascript.html