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 Replies


ADVERTISEMENT

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 8 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

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 :: 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

Changing The Field List

Apr 5, 2006

Hello,
I have a form that I need to modify. Currently, the field list shows Query 1 as the 'control source' for the text boxes on the form and I need to change to use Query 2 but I am unsure of how to do this. Do I have to delete the test boxes and start fresh or can I change the field list and use Query 2 as the source?
Thanks for any help.
JTP

View 2 Replies View Related

Changing The Colour Of An Item In A List Box

Sep 13, 2006

HI all, the objective is to grey out an item within a listbox, where the id number is the same in another sub form. The sub form is called contacts and the list is called list15. the unique id that is linking the two is SWD.

HELP...:confused:

View 1 Replies View Related

Colour Changing Fields In List Box

Mar 16, 2008

Hi there guys,

I need a little help on a little situation. Basically, my client for my school project wants to be able to see graphically if orders sent to their bookstore have been processed or not. So i suggested a change of cololour of the fields.

Now I have created a Form containing the orders as they are stored in a list box, (both already processed and unprocessed orders), now I want to be able to allow each item in the list box to be either Red (if unprocessed) or green (if processed) so the user can see which ones they need to deal with. Im guessing this would take some VB, but if anyone could help me, I would really appreciate it :).

PS, if you do provide VB could you please explain a little of whats going on as i have to annotate all the code I use and im not too profficient in VB

Thanks a lot

Dan

View 1 Replies View Related

Drop Down List Is Changing All Entries

Jan 31, 2006

I have a drop down list where you pick from 6 recruiters. i put it on my candidates from and when yiou change a recruiter on one candidate then all the candidates get changed to that recruiter. Any ideas what i did wrong?

View 1 Replies View Related

Forms :: Changing Combo Box On Form To Allow Entries As Well As The List?

Jun 3, 2014

How do I change a combo box that I have on a form so that it will allow entries as well as edits?

View 1 Replies View Related

Access 2010 - List Box Changing Column Order

May 16, 2014

I have a list box and a series of 11 fields a user can search by. My problem is that the List Box has changed the column order.

Example: In the design wizard of the list box I had it such that the columns were in order 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11

Now after I hit search the fields populate out of order... 4, 9, 2, 1, etc...

View 8 Replies View Related

General :: Changing Column Colour In List Box - Alignment For Cells Data

Jan 7, 2014

How can change column color in list box and also how to make alignment left or right for cells data.

View 1 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

Auto Refresh Table Content

Feb 27, 2012

I have a database in access that i have shared it and 5 person write in it. I want to show the datasheet in a monitor but my problem is hat I cant use auto refresh the Table datasheet. How can I auto refresh the datasheet of table when every client change it?

View 1 Replies View Related

Collate Field Content From Multiple Records

Jul 15, 2007

I have a database with company records in one table and calls made to companies in another table; the two tables properly related on a CompanyID field. A query joining the tables returns a dataset with multiple instances of CompanyID's because each company may have received 0 - n calls.

I would like to collate the content of the 0 - n[/I] callnotes records for each company into a single 'CollectedNotes' entity. I have two questions please.

Can anyone think of a way to do this without using code?

If not, can anyone give me a helping hand with the code?

In pseudo-code terms, I anticipate something like accessing the recordset for CompanyID's related to CallID's looping through to write the content of each instance of a CallNote (identified by unique CallID) to a new 'CollectedNotes' object. Help gratefully received. Thanks. MITW

View 3 Replies View Related

Content To Control Changed On Open Or View

Dec 22, 2006

Hi

I have a text filed on a tab control on a form. What I want to do is when the record is opened for viewing I am it changed the contents of that field. The reason that I am doing this is that I am auditing the changes in the database and any changes to any of the fields are recorded on the in this table along with the users windows username.

This would put an entry in the audit table for everytime a record was opened, even if no changes were made to the record and I want to use this information to create a last ten records form for the users to view there last ten records.

Does anybody know how I can do this.

Thanks

View 3 Replies View Related

Deleting Records Based On A Field Content?

Nov 16, 2004

Hi all!

I'm rapidly beginning to get a little confused... I'm trying to mass-delete records based on the content of a field.

I want to run either a query or a button on a form (or anything, for that matter) that will delete any records when there is an X in the N_Disp field.

Any ideas?

Thanks,

Barry

View 3 Replies View Related

Counting Records With Specific Field Content

Nov 23, 2005

hi there

I'm building a forum from the scrath. It is already working, but I want to have in each topic the number of replies it has.
there are 2 tables, one for the topics and other to the replies. in the replies table there is a field called id_post that has the id of the post witch it belongs.

I solve the problem by inserting a query inside the loop of the posts:

<%
While Not rs.EOF
%>
<%
Set rs2 = Server.CreateObject("ADODB.Recordset")
sql = "SELECT COUNT(*) as cont FROM replies where id_post= " & rs("id") & " "
rs2.Open sql,Conn,1,2
%>

post: <%=rs("post")%> replies:<%=rs2("cont")%>

<%
rs.MoveNext
wend
rs.close%>

but someone told that this would make the page slower, so I want to know if I can do the same thing without having the query inside the loop.

I don't know if I made myself clear, sorry for that.

tks for the help.

View 1 Replies View Related

Content Source Help (probably Easy But Im Just Starting Access)

Aug 8, 2006

Im just starting to use access for a small business. Im fluent in visual basic but i cannot seem to get this to work. so im using the wizard for the "Order Entry" and it works great. However, on the Preview Invoice where you can also print it, i would like it to include the credit card number, payment method, experiation date, ect. which all can be found on the payment form for the order. I have a text box but i cannot seem to get the write content source. what would be the content source so it can access the payment details from the other form and print it along with the invoice.

View 1 Replies View Related







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