Automatically Changing Cell Content (newbie Question)

Jan 27, 2008

I wasn't sure which section this belonged to (tables/forms/visual basic?) so I posted it here. Keep in mind I'm a database and VB novice so please bare with me.

I'm trying to create a database based on an Excel document. In the Excel document different entries selected from a dropdownlist will automatically generate content in other columns (for example cell C1 might be generated by "=A1+B1" in Excel).

I created a main table and linked it to other tables using the wizard (sorry, don't know the name for it in English), which allowed me to select values in the main table using a dropdownlist. See the attached picture. Then I created a form using the wizard. To be able to automatically change the value on one cell depending on the value of another I used this bit of code:
Me!KlarTextboxName.Value = Me!DatumTextboxName.Value + 7
With the above example I could change the date in column "Klar" to seven days ahead of column "Datum", by setting this to be activated on the "Datum" update event.

But I have no idea how to change the value on one of the columns that are linked to another table! I tried using the same method, and changing the numerical value of the cell works (it will link to the numerical key value of the sub table) but that isn't very dynamic. If for some reason the key values of the sub table are changed then the script will link to the wrong entry.

I'm grateful for any help or advice you might have to offer me. If I'm not being clear enough on what the problem is please tell me so I can clarify. Thanks.

View Replies


ADVERTISEMENT

Changing List Content

Dec 1, 2005

I have 3 tables in my database; 1) Policies, 2) Salespeople and 3) Shops.
We have a several shops, and each shop has their own salespeople. In the table Policies we have to select the shop where the policy is sold, but also the salesperson that made that sale. As soon as we receive a policy from Shop A we have to add that new record in the Table Policies. This table we select the shop, say for instance Shop A. The next column there is a droplist of all the salespeople.
Now my question: Is there a way to get a dropdown list of only the salespeople from Shop A, or only the salespeople from Shop B when I select Shop B?

View 3 Replies View Related

Changing Total Cell To Expression

Aug 8, 2006

When i use MS Access help to search for my query i get this result:"Note: If you add a calculated field that includes one or more aggregate functions to a query in qhich you're calculating totals on all the records, you muct set the calculated filed's TOTAL cell to EXPRESSIONHow do i do this?????

View 1 Replies View Related

Lookup Field / Combo Box - Changing Colour Of A Cell?

Mar 7, 2012

I have a Lookup field/combo box and want to have the cell colour change if a certain word is chosen. if not then the cells stay the same.

i.e., if "cancelled" the cell turns red, if any of the other two options are chosen, then leave as is.

View 3 Replies View Related

Forms :: Changing Embedded Excel Sheet Cell Value - Access 2010

Mar 9, 2014

I would like to embed a blank worksheet in access form. I want to do a macro to change the cells value when I click on a button, but I don't know how to do it?

View 3 Replies View Related

Newbie: Changing The Value Of A Field On Form

Dec 11, 2005

Hello...

I am a newbie to Access or any database for that matter. So please be gentle.
I'm in the process of writing an automotive invoicing database and have gotten stuck early in the game.
On my form I have Qty1 - Mat1 - and Amt1 fields placed from my database.
In Amt1 I would like to typein an amount and have it multiplied by 15% (.015).
I fiddled with the "On Enter" in the Amt1 property box but got nowhere.
Can someone help???

Thanks for your time
d9085@hotmail.com

View 7 Replies View Related

Create Field Content Based On The Content Of Others?

Apr 16, 2007

Can I create contents of one field based on the contents of others?

I have a database of pc systems which we've tested and was wanting to generate a single text line to identify the individual pc

The single filed would contain data from the following fields
Job Number
CPU Type
CPU Speed
RAM
HDD size

eg
So the new field would contain "Job345-P3-1000-256-20"

Can this be done?

View 3 Replies View Related

Changing A Field Automatically

Dec 7, 2004

hiya... he's my problem........

i have 3 tables: tblVolunteer, tblMedicalCondition, tblVolunteerMedicalCondition.

in tblVolunteer i have: volunteerID, volunteerName, HEALTHY (yes/no)

If a volunteer doesn't have a record in tblvolunteerMedicalCondition, i would like the HEALTHY field in tblVolunteer to default to 'yes', and if they do get a related record in tblVolunteerMedicalCondition, i would like the HEALTHY field in tblVolunteer to change to 'No' automatically.

How do i achieve this please..????

many thanks for viewing!!

View 1 Replies View Related

Changing A Field Automatically

Dec 7, 2004

hiya... he's my problem........

i have 3 tables: tblVolunteer, tblMedicalCondition, tblVolunteerMedicalCondition.

in tblVolunteer i have: volunteerID, volunteerName, HEALTHY (yes/no)

If a volunteer doesn't have a record in tblvolunteerMedicalCondition, i would like the HEALTHY field in tblVolunteer to default to 'yes', and if they do get a related record in tblVolunteerMedicalCondition, i would like the HEALTHY field in tblVolunteer to change to 'No' automatically.

How do i achieve this please..????

many thanks for viewing!!

View 1 Replies View Related

Changing Field Names Automatically

Oct 15, 2005

I have an Application that I want to re-use for a second user. The only change I need to make is to re-name the fields.

Is there a tool that can do this across the tables, queries and reports for each field name change ???

View 1 Replies View Related

Changing Colors In A Field Automatically

Mar 15, 2005

Hi everyone,

The problem I'm having is I need to have the background of a field change color depending on what's contained within the field. There's only three possible entries in the field: active, inactive, and a blank entry. I need it to show green if the field contains "active", red if the field is "inactive" or is blank (I also want the blank fields to show inactive, but that's niether here or there right now.)

I've been trying to get it to work with an if then statement, and setoption to change the background. I've had no luck with any of it, though.

Any help would be greatly appreciated. Thanks in advance.

-Walter

View 3 Replies View Related

Automatically Changing A Picture On A Form

Aug 8, 2007

I have the need to put a company logo on a form based on the company selected from a combobox on the form. I have a table which has one field for company name and another field containing the picture object. The form itself is bound to a different table where I want to company selected from the combobox to be recorded. I want to make the form capable of displaying the logo (bound ole object?) based on the company selected from the combobox.

I think I am close, but I do not know the proper method for doing this.

View 4 Replies View Related

Modules & VBA :: Matching Content To Other Content?

Feb 4, 2015

how many elements matching to my primary elements from any records of my query and count match, if some element doesn't match then I need to add it to my primary elements, then at the end (rst.eof) count how many primary elements I have.

E.G

id colours
1 blue;red
2 purple;blue;green
3 red;violet;purple;blue

dim matching_elements as long
dim primary_elements as string
dim TheNumberOfPrimaryElements as long

First of all, if I open recordset primary_elements is empty so I need to assign a value form first record.

primary_elements = rst!colours (so primary_elements = blue;red)

Now I can start comparing my primary_elements with second record:

matching_elements= 1
primary_elements = blue;red;purple;green

comparing my primary_elements with third record:

matching_elements= 3
primary_elements = blue;red;purple;green;violet

It's my last record so I need to count primary_elements

TheNumberOfPrimaryElements = 5

I need "matching_elements" to count other function in my application.

View 7 Replies View Related

Forms :: Changing Background Colour Automatically

Jun 16, 2014

Here, what I am trying to learn, that background of the form change its colour automatically after sometime let say 1 min or after 2 min

I find the link on the web where more than 500 colour code are available, but not sure, how I can use [URL] ....

I can put this command on form_load()
Me.Detail.BackColor = ?????????
but question is how i can bring other colour into loop

Plus, if the user want to do any work on the same form, will this loop also allow the user to do any work, I mean form should not be stuck up in the loop of changing a colour...

View 1 Replies View Related

Changing Environment Field Automatically In Report

Feb 15, 2015

I have an Access database (.accdb) that has table, form and report. The field in all are the same. The user interacts with the Form only and enters data to it. Table is a back-end thing and no-one goes to it. However, in Form there is a button that when pressed, prints the report for that relevant form/record which we then give to customers.

Now, I have a field in report (like a signature field) that mentions the name of the user who printed that report. Lets say, Mr X did the data entry and then printed the report and gave it to the customer. After that customer loses the report and comes back for a copy of the report, but now Mr Y is at the desk and issues the report. Obviously Mr Y doesn't have to do the data entry again because record is there and Mr Y has the access to it, so he just presses the print report button and prints the report. What I would like is that the signature field should update itself if anyone else (in this case Mr Y) accesses the database and prints the report for that specific record.

View 2 Replies View Related

Forms :: Changing Environment Field Automatically In Report?

Feb 15, 2015

I have an Access database (.accdb) that has table, form and report. The field in all are the same. The user interacts with the Form only and enters data to it. Table is a back-end thing and no-one goes to it. However, in Form there is a button that when pressed, prints the report for that relevant form/record which we then give to customers.

Now, I have a field in report (like a signature field) that mentions the name of the user who printed that report. Lets say, Mr X did the data entry and then printed the report and gave it to the customer. After that customer loses the report and comes back for a copy of the report, but now Mr Y is at the desk and issues the report. Obviously Mr Y doesn't have to do the data entry again because record is there and Mr Y has the access to it, so he just presses the print report button and prints the report. What I would like is that the signature field should update itself if anyone else (in this case Mr Y) accesses the database and prints the report for that specific record.

View 3 Replies View Related

Forms :: How To Limit A Field Content Based On The Content Of Another Field

Nov 25, 2013

As I began thinking about the data that I need to include in one of my reports I relized that I need to gather some extra data.Each design change has a lifecycle with 7 basic states from not started through to closed. States 4, 5, and 6 have two posible sub-states that I need to capture and report. It is almost like having options.

My data entry form already records the 7 basic states. What I would like to do is have another field that records the sub-states if the design change is in one of those three states.

Will a ComboBox do this?

Do I need a test routine for the After Update event in the first text box? Something that will check for states 1 - 3 and 7 move on to the next field and if states 4 -6 require users to enter the sub-state.

Would a nested if-then-else routine do the job?

View 1 Replies View Related

Add Value To Cell According To Another Cell In Same Record

Nov 21, 2006

i have a table of articles. A field in the table is ArticleSubject

the ArticleID is made up of 3 letters then 3 numbers. i want the 3 letters to be something according to the subject
for example i want the first 3 letters of the ArticleID to be MAT*** (* is a number) if the subject is Maths
or ENG*** if the subject is English

the subject is picked from a listbox in the same record

how would i do this in a table . i am reluctant to use append or update queries.
but will do so if its the only way.

View 4 Replies View Related

Split Content Of The Field

Apr 15, 2008

I have a field in access database called result (coming from webform) and the content is something like: 'not much; 2' or 'frequently; 5'. How can I split numeric and text value into two separate columns in query?
I will greatly appreciate any help.

Debbie

View 14 Replies View Related

Print Listbox COntent

Sep 26, 2006

ello again,

How would one go about printing just the contents from a listbox (called listData) on a form using a command button?

Thanks in advance

Tc

View 4 Replies View Related

Text Box Content Won't Display

Dec 7, 2006

Here's a strange one.....

We have only 4 computers in our office. Our DB backend is SQL server and due to constant corruption of the database from multiple users, each user/computer runs its own separate copy of the mdb file.

I have set up a small form in a separate database to allow me to quickly compact the DB and copy it to the 4 locations on the network instead of doing it manually. This process works fine...BUT....I have a text box on the form set up to display the copy progress and the contents of the text box do not properly display during the file copying. Even though the code to change the value of the textbox comes before the file copy command, the textbox will not display the until after the copying is finished. However, when I step debug the process it displays the information correctly before the file copy command executes.

Here is a sample of my code...
Dim strPath1 As String
Dim strpath2 As String

strPath1 = "C:FortuneSystemTemp.mdb"
strpath2 = "\ScottFortune"

If Dir("C:FortuneSystemFortune_System.ldb") <> vbNullString Then
MsgBox "Cannot proceed! Fortune database is open.", vbCritical
Exit Sub
End If

txtProgress = "Compacting Database"
'compact master DB to a temporary DB file
DBEngine.CompactDatabase "C:FortuneSystemFortune_System.mdb", strPath1
txtProgress = ""
If chkTed Then
If Dir(strpath2 & "Ted.ldb") <> vbNullString Then
MsgBox "Ted cannot be copied. Program is running.", vbCritical
Else
Screen.MousePointer = 11
txtProgress = "Ted Copying"
Kill strpath2 & "Ted.mdb"
FileCopy strPath1, strpath2 & "Ted.mdb"
txtProgress = ""
Screen.MousePointer = 0
End If
End If
....etc...


Can anyone explain why this is happening and possibly a way around it?

Thanks

View 2 Replies View Related

Dynamically Generate Content On Forms

Apr 10, 2006

Hi,
Does anyone know of a way to dynamically fill the content of a form at runtime. I want, for example, when a user clicks a button, a textbox is dynamically added (but I would prefer not to use hidden objects). I've tried the "CreateControl" option but I can't seem to get this to work. Any coding examples would be much appreciated.
Thanks,
Mark.

View 4 Replies View Related

How To Clear The Content Of Controls In The Form

Jun 12, 2005

I designed a Data Entry interface. I wish the system can automatically clear all the values of controls in the form after users click the 'save' button.

Is there any good solution instead of manually setting each control's value to null?

I tried Undo method, but it didn't work on either control (textbox) or form itself.


Many Thanks

View 2 Replies View Related

Form To Select Report Content

Nov 24, 2005

Hello,

I have a query set up as the record set for a form containing combo boxes.

The form has four combo boxes with various drop downs. I have linked these combo boxes to the query using this syntax in the query:

[Forms]![frmToolStats]![cboModel_Number]

I have a preview button report on the form to load my report template to be populated with the combo selected info.

If I fill all four combo boxes with specfic info then my report displays all data records related as you would expect. For example I can select A 'Tool Type', 'Manufacturer', 'Model Number' and 'Tool Condition' and my reports will show me three test records relating to these specific parameters.

How do I set the code to allow me to complete only some of the boxes and return the records i.e. only 'Tool Type' and 'Model Number'.


I am trying to get my report to lift the data for test records for each specific tool by model number and tool condition and then do some calculations. This forms the full report.

I have tried this code:

If Not IsNull(Me![cboToolGroup]) Then
where = where & " AND [cboToolGroup] Like '*" & Me![cboToolGroup] & "*'"
End If


Can anyone help?

View 14 Replies View Related

Tables :: Replacing 100% Of Table Content

Jul 1, 2014

I have a table (which has a few relationships) that contains 10.000 records up-to-date, but I've been making major changes to my database working on an old version from early June, when it had +9000 records.

What I'm planning to do to update the table:

export those 10.000 (up to date) records to a Excel file
delete those outdated +9000 records manually (select all + supr)
import the data from the Excel file so my new database is up-to-date again .

Is this acceptable or could lead to weird errors in the future?

View 2 Replies View Related

Forms :: Verifying Content Against A Table

Oct 8, 2014

I have a simple database that a user records the work they have done for the day. They are required to fill out the form with the item number, date, qty etc... the problem is some people are fat fingering things and i am not getting the right item numbers... I have a table called dbo_item with all the possible item numbers in it, is it possible that after they hit enter or click off the item number box it will tell them they put in an invalid item if it doesn't match one of the items from that table?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved