Need help on creating a form that stores data

Emil Avramov

New member
Local time
Today, 07:46
Joined
Oct 26, 2015
Messages
7
Hello,

I'm relatively new to Access and I've read that storing values in unbound fields in forms is a horrible idea and does not work without coding.

I need to make a form that can store text and combo field values. I'll be using the form to input text, edit text and so on. It's for a project. I won't save the values to a table since the idea is to save the values directly into the form without a table for easier use & navigation.

So having said that, knowing it's a bad idea and will likely take a lot of work, can someone tell me how to make it happen?

TL;DR: I need to find a way to store values in unbound text boxes and combo boxes in a form with pages.

Thank you!
 
You need to clarify your idea. Data is stored in a table. A form is used to view or manipulate data, not to store it.

The essence of a database is a good data structure, forms are of slightly lesser importace, despite the forms being visible to user and tables not. Your post is rather confusing so show an example. Also, you post is very unspecific, akin to "show me how to build an aeroplane". Be specific as to what you want.
 
Hey,

Sorry, I didn't really know how to explain it.

Basically I want a user to input data in a form (it can be a word, a sentence or a paragraph text), then save it and close it. Once they reopen the form, I want that text to be there. It doesn't need to pull data from anywhere since it's just a data entry form basically.

I'm currently trying to figure something with this, but to no avail.

Code:
Private Sub TextBox_AfterUpdate()
'Use current input value as default value
'for subsequent records.
TextBox.DefaultValue = Chr(39) & TextBox.Value & Chr(39)
End Sub

I.e. trying to save the unbound text box value to the default value.

Is this better? =/ :confused:
 
do it in the form's property window, click on your textbox and on the property->defaultvalue.
 
It's not working. I'm typing it into the properties window (under Code Builder), but it's not saving the value.

When I enter text in Form View mode, it doesn't save it. The thing is, the default value will change, so I need it to store the new one.

Example below:

User inputs "Test" in the unbound text box in Form View mode.
"Test" is saved to the default value for the text box.
User closes the form.
User re-opens the document and the default value is "Test", thus outputting that in the text box.
 
Why not just save the values you want to a single line table, the use those as the default values on the next opening of the form?

I'm guessing you are then using these values somewhere else?
 
Hey Minty,

I'm not using these values after the input, they're for record keeping purposes only since it's an audit program. The forms will be reviewed at some point.

The initial was not to use a table, rather just have a coded template that users will fill in a database.

Any ideas?
 
Did you are not going to use a database then maybe you could just use a Word document.

Brian
 
I have my reasons for using Access, even without a database, as paradox as it might sound.

Can someone help me with the code that's needed to write a user's input text/value from Form View to the field's default value?

Please?
 
However you do it you need a memory location. I too would have suggest the default value of the Control. Alternatively:-
The Controls tag property.
An array. (Would Lose the info if form is closed)
A persistent record set.
Add custom property's to your form and store them there.
A class Module if you intended doing this with many differently set out forms.

If I was to consider this I would look for examples on a VB - VB6 forum, where different storage methods were more likely to be employed.

But the simplest, and the way an access programmer would be most experienced with would be in to a table. In other words, getting help will be easy, something to consider!
 
I suggest you give us a brief description of the "business side" of what you are trying to do. As you can see, readers are not understanding the task in plain English.

A word , sentence or paragraph pertaining to what. If you are trying to build some sort of "boiler plate" statement to be used as and when needed, then a sample or two would help with context.

I'm not convinced you understand database or Access, but I think your post is unclear, so have no real info to work with.

How about a few lines of description telling us what happens to what under what circumstances--where does audit fit etc?
 
I have some understanding of Access, as I said, I'm fairly new to it.

Ok...long story then. Since we'll do testing on various business procedures (over 200), I don't want us to use excel files like we do now since it's going to be a mess.

I want to have those testing procedures in access for easier navigation, possible reporting later on and for it to be all in one place. I already have the layout mapped out and it's going to be a combination of excel and access for our purposes.

Basically, the forms would need to contain data that will be the same format and might change from time to time. I don't want the users to enter design mode every time they want to change something via the default value.

I want them to be able to type a text/word in Form View mode and that to be set as the default value, or anything that works for that purpose. So that way they don't have to use tables (most of them are new to access and this will get over-complicated and confusing for them fast), they can just input data and when they open it, it's still there.

Attached is the template, basically, the unbound text/combo boxes need to be that way.
 

Attachments

Interesting. So this is a template to be completed by ? Under what circumstances?
Where does the data entered into the boxes go? Who does what with the recorded data?
Do you use this for analysis and product/process improvement?

Do you have examples of a completed form or two?
 
Yes, this is a template to be completed based on data gathering and testing of processes. It will be copied and used very often.

The data in the boxes should stay in the boxes, i.e. in the default value field. Any links/attached files are linked to our network drive/s. The data will be analyzed at some point and yes, it's for performance tracking/improvement.

I cannot give examples since the data is confidential, but based on the fields, you can guess what goes where.

So, any ideas on how it can be made to work?
 
I'm going to relate a project that was done several years ago. I see a similarity, but maybe I'm missing your full intent.

We had an opportunity to provide a means for companies to describe themselves and their products and services. This was a major change from previous systems where data was collected on forms from companies and compiled into books and publications.
In overview the concept was to provide a facility for companies to add their own data to our database. In effect, you can market your company and its product/services to anyone on the internet using our facilities. So we needed forms to collect data, and in our case we needed to have forms in English and French. So we had forms for company
info (LegalName, OperatingName, AlternateName, MainPhoneNumber, PhysicalAddress, MailingAddress....) Product info (ProductName, ProductDesc.....) Services info (ServiceName, ServiceDesc....), Primary Industry NAICS, OtherIndustries NAICS..), Contacts and Positions...), Markets ...). etc, etc,
We also needed some procedures and tools for our use to verify/validate some data. And we needed a way to store the data into a database and a way to retrieve and present the data to internet clients.

So there were form layouts that were mocked up with sample data to ensure the format and terminology was consistent throughout. The form layouts and fields became records in tables. Forms were reconstituted for presentation in HTML from the processes involved based on the form, field and language relevant to the client. As the form was being constructed, the relevant data was selected from the various tables and presented on the proper location in the generated HTML page(s).

So in overview, the forms and their component parts were in tables. A form contained headings in certain locations; the headings were made up of strings. The strings existed in English and French. The data for each company, product, address etc were in other tables. When designing the client interface, the proper form , strings and language were assembled along with the relevant data for each company, product etc.
Our design allowed us to build Industry specific Catalogs, or City/Province specific catalogs (flexible design to accommodate a variety current and future needs).

Seems like a similar approach to what you have. Hope it's helpful to you.
 

Users who are viewing this thread

Back
Top Bottom