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 Replies
ADVERTISEMENT
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
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
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
Jun 4, 2013
I am making a very simple 'registration' database for a children's event in a couple of weeks.I the table/form there is a checkbox field called 'consent' which, if checked, indicates that a child can leave the event without parental consent.
There is a report printed on each child (a registration page which the leaders get a copy of). I would like on this report a 'red box' to appear if the child cannot leave without permission (i.e. the consent box is not checked). I would also like this 'red box' to appear on the form. I had thought of doing it this way - but I'm not sure if it's the best, or if it's possible:
Have a field in my table called 'consentindicator'. When the 'consent' box is checked, there is a period ('.') placed into the 'consentindicator' field. It is set to turn red when a period is present. That way, when the consent box is checked, a get a red 'box'.
View 12 Replies
View Related
Oct 15, 2014
I have a module which generates an autonumber based on a table content (Tbl:Numbervalues) and a prefix (prefix held in Tbl: TextValues)
the module itself works fine and after every getprefix & getnextnumber it updates the number within numbervalues table to the next unique figure.
However what i want it to do is within my database i want to loop through all the records and update a column based on the getprefix() & getnextnumber()
so at the moment lets say column A has values of SHA000001 (in all 100 records) i want it to loop through those 100 records and update to be SHA(from the prefix table) and 000001 all the way to 000100.
Code:
Public Function GetPrefix() As String
On Error GoTo GetPrefix_ErrorHandler
GetPrefix = DLookup("Value", "TextValues", "Description = ""InvoicePrefix""")
If Len(GetPrefix) <> 2 Then
msgbox "The Invoice Prefix Value in the Text Values Table is not 2 characters long!", vbCritical, "Critical Warning"
End If
[Code] ....
View 5 Replies
View Related
Jul 26, 2012
What I am wanting is to be able to build dynamic form content/elements based on entries on a table. This is for a gym membership system. What this form is going to be used for is to allow the front desk to scan a membership card which then performs a search on the database. Part of this search is going to be on a table that contains various add-on classes, tanning sessions, etc that a member can add beyond their base membership.
On the left side of the form, I will display a picture of the member and their name. What I am wanting to do on the right side of the form is to build a dynamic list of the add-on perks they are enrolled in.
I know I could hard program elements on the form to be visible or invisible, but that would be static and leave gaps when I have to turn things off b/c that member isn't enrolled in that class, etc.
Is this even possible with Access and VBA? I know I could do this sort of thing with a webpage using PHP, PERL or whatever. I don't know the limits of Access Forms and VBA.
View 5 Replies
View Related
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
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
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
May 11, 2014
I have a form with a number of fields and sections which change visibility based on the data entered in other fields,
The fields have an "on update" event to check the content of the field and make the appropriate changes,
I've changed this form to be able to edit records instead of "Data Entry" so now I need the checks to occur when the record changes as well as when data is entered,
How best can I achieve this without simply duplicating the code (which seems like a bad idea) into the "On Current" event?
View 3 Replies
View Related
Jan 26, 2014
I would like the text from the previous field Invoice_Contact copied into the field Invoice_Contact of each new record created. I think I can use CTRL ' - but would like it done automatically if possible.
Field location:
Form = PatientUpdate - Subform = F_Invoice - Field = Invoice_Contact
The form and subform are linked through: Pat_ID
The subform is based on the table called Invoice with Invoice_ID as the primary key.I tried several variations of this DLookup from examples I found on the web but the field comes out with "error" in it and its flashing!
View 14 Replies
View Related
May 24, 2012
I want to display the ID of a dataset in a form but I don't want the user to be able to edit it. Therefore I want to display the id in a label and not a textbox or combo etc.
I can't see a way of how to do this though. Is this possible, or am I going about it the wrong way?
View 3 Replies
View Related
Feb 26, 2006
in my form I created an unbound field with a requested combination, now how can I put those in a table field.
in other words, how can I send the content of a form's unbound field to a field in the table?
your help is very appreciated.
Regards,
CS.
View 3 Replies
View Related
Dec 31, 2014
I have a subform with continuous records. One of the fields in the recordset of the subform is a field named "Remarks". This field does not need to be visible on the continuous subform as it is rare that this field will have any entries.
I plan to apply conditional formatting on another field (IDcardNo) in the record line of the continuous subform so that when field "Remarks" contains any data it will show as a different format on the field IDcardNo.
I would like to make a small form appear when one points to the IDcardNo field with the different format, so that the data in the field "Remarks" pops up when one points to the field IDcardNo with altered format, showing that there is data in the field "Remarks".
View 3 Replies
View Related
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
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
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
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
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
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
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
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
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
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
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