Field A Field B Result
Chips Fries Replacement of 'Chips' with 'Fries' on menu.
(null) Fries Addition of 'Fries' on menu.
Chips (null) Deletion of 'Chips' on menu.
Can I do this in Access using some form of append query?
I am trying to do is to make a for loop to insert multiple text fields in on table.
Depending on the counter (Zaehler) it should insert that representing text field. for example if Zeahler is 1 it should input whatever is inside the text field KVP_Kfm1 if its 2 then it should input the textfield KVP_Kfm2 and so on. here is the code that I'm trying to work but sadly it wont.I believe that the mistake is that my syntax is wrong but i cant figure out what is right.
Code: For Zaehler = 0 To (Forms!frmCMP!txtAuslaufjahr - Forms!frmCMP!txtAnlaufjahr) SQL = "INSERT INTO tblLifecycle_Projektion(ID_Berichtstand, KVP_Kfm, KV P_technisch, AeJ, MoPf, skAe, MiBst, Sonstige_Effekte, " & _ "KVP_technisch_FTR, KVP_Kfm_FTR, AeJ_FTR, MoPf_FTR, sk Ae_FTR, Sonstige_Effekte_FTR, Jahr) VALUES " & _
I have three tables which I have linked with relationships. The linked fields are given the ID number of the parent, where I wanted the value. What on earth am I doing wrong, something stupidly obvious I bet! Access 2007
I am trying to use a check box to either grey out certain text field(s). For example If the box is checked true then certain fields would become available to input data. If the box is not checked it stays grayed out.
I have a form with many fields on it. For some reason some of the text in the form fields don't line up vertically with other text even though I have aligned them to the grid and to each other. I have Access 2013.
I'm trying to concatenate two text fields into a memo field using an expression in a select query. My problem is that the text fields together end up more than 255 characters, so I need the resulting field to be a memo instead. I can't change the underlying text fields to memo fields because this is a large database used by others who need those fields to be text.
I have a table: id date status ==================== 1 03/01/2006 W 1 02/01/2006 L 1 01/01/2006 L 1 31/12/2005 W ... 2 03/01/2006 L 2 02/01/2006 L 2 01/01/2006 W 2 31/12/2005 W ... 3 03/01/2006 W 3 02/01/2006 W 3 01/01/2006 W 3 31/12/2005 W ...
What I want is to concat the field status showing the latest 5 results, like this:
id status ========= 1 WLLWL 2 LLWWL 3 WWWWW
I have tried to use concat, but i can't get the desired one. Any idea to do that?
I am having trouble concatenating a field from an employee table where the format is "Last name, a comma, a space, first name." I attached a screen shot of my database.
This may look like its fairly quick,.. but its the slow as hell,.. across the network "front end back end" especially when cross referencing againts qty's already ordered. "not included in sample"
I have only attached a basic sample of the query with some data, on my full system this acts very much like a Dlookup would do on a continuous form. "if you were foolish enough to use one there"
Check out the module for the code
My Question is: Is there an alternate "Speedy way" to produce the same results as seen in the sample.
To explain more,.. this is what i have and works fine,..."except having to wait a minute for the concat" which as you can imagine is very irritating for the user,.. when they have many lines to purchase.
When a job is created item required to be purchased are put in the Requests Table
Code:ID #Part NumberDescription StatusQty ReqUOMWork Order1-50114N4082-6Leading Edge SkinStock Required2eaWO07-421 - WO07-690 The ID is then purchased against on the Order Screen
The Id goes into the purchase order table
The Id is then Split back down to its original numbers
The original numbers then look back at the Request table and update the status to Ordered
I have a Concatenate string of text and currency. When joined together, the currency format disappears. I need to reformat so the string stays together with new format. Below is what I have:
Public Function ConcatAgreementFundsCommitted(ID As String) As String '/ Purpose: Generate a concatenated string of Tracks for selected line. On Error GoTo Err_Handler Dim lngLen As Long 'Length of string. Dim strOut As String 'Output string to concatenate to.
Is there a way to assign some short cut controls that will insert certain text into the field the cursor is in? For example, is there a way to assign "No mustard" to Alt-M?
I have an insert into statement this involves inserting values into date/time fields. I understand the a '#' has to come before and after the value, and when all values are populated this works great.
Code: INSERT INTO TableName VALUES (#1/1/2013#,#1/2/2013#)
However, what about in the case of Nulls? The resulting statement then looks like the following. This results in the statement trying to put a '##' in the table and it doesn't like it.
Code: INSERT INTO TableName VALUES (#1/1/2013#,##)
I am trying to input records into a local Access table, not a SQL table.
hi guys. i was hoping you guys could help me, i have a combo box "cbocontract" which gets populated according to a selection from another combobox(cboAll). now i have another combo box(cboStatus) which according to what the user selects in cbocontract list box it should display active or inactive, now i have the row source from the cboStatus like this:
SELECT DISTINCTROW Test.Status FROM TEST WHERE (TEST.Facility=forms![Change of Status]!txtInvoice.value) and (TEST.PM_Contract_ID=forms![Change of Status]!cboContract);
it works perfectly, however is there a way to make put this code in a text box? how do i insert the select distinctrow into a textbox??? it should only display one value according to what the user selects in the cbocontract combo box... also, the user should be able to edit this textbox.
i have 1 table name "table1"and i have in this table 4 fields
1) id 2)pay 3) tax 4) total
The id is primary. I have form in this form i have 3 text box "pay" "tax" "total". i want to insert some number to pay and number to tax and make some button to make calculation of the 2 text box and it will show me the result in the total and insert them to the fields.
I currently have a bound form that adds a new student, however, I've decided I don't like bound forms as weird stuff can happen (like when the user exits in another way than I anticipated) so I'm making an unbound form which will add the student when a button is clicked. I already have this working on some other places so this should be no problem anymore.
However in my database a lot of student information is optional and only a first and last name are required (and ofcourse an autogenerated PK). So my question is how do I deal with these fields that might or might not be empty?
I could make a fairly big If ... ElseIf... construction where I slowly fill a String with all the optional fields but I was wondering if maybe there are some better ways to approach this?
I have a form with two text boxes in which I would like to insert the current date automatically when the text box has got focus. Default value doesn't work because the current date may occur on two different days, and the default has to be null until the current date is inserted.
Can someone walk me through the process? Thank you.
This is really hard to explain, but basically I'm trying to use a combo box that has a control source different than it's record source to update another field on the record source. For example, the combo box pulls it's options from a table called "NameList" and when you select an option from the combo box it updates a table called "Results". On this form there are form fields that are bound to the "Results" table. What I want to happen is, when I make a certain selection from the combo box, I want one of the fields bound to "Results" to automatically display text from a different table. Is this even possible? If this is a horrible explanation, please let me know. I need serious help on this one, I've been working on this for a day and a half now. If anyone has any ideas on how to do it a different way, please make suggestions. Thanks in advance!
- Josh :confused:
Also, another thing I forgot to mention, this may help anyone who tries to help me. This "Results" form is basically used as a log utilizing a report to display a sequence of events. I've included a screenshot for visual affect. I have censored a few things for privacy reasons.
I have a text field called Notes - where we will add notes about the particular job. What I want to do is have it a locked field with a button 'Add Notes'. When clicked it will insert the date and the user name of the person and then let them type the notes. When they move to the next record - I want that field to be locked again.
I've got some of it down but still not right. I can get it so it inserts the date but it overwrites what is already there. How can I get it to just add the data - not overwrite? And I can't get it to lock when they move to the next record.
I'm using Access to export the results of a query to Excel and within the same code I am opening up the spreadsheet to format it. Part of the formatting requires me to find the first empty cell in column A, and then insert the text 'Summary'.
Within Excel, the following code works:
Find empty cell:
Code: Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Select Add term 'Summary' to cell:
Code: ActiveCell.FormulaR1C1 = "Summary"
I've tried a few different things based on some code I've found on the net from similar situations, but in just about all attempts I get an object defined error. I've tried dimming the piece of code as an object, but when it comes to VBA, I'm just fumbling through.
I have an insert query that has been working just fine. I added three new columns (Paid, Balance, Invoiced) to both tables that I am using in my query. The query will insert the new records that don't exist in the one table just fine but it is not populating the new columns.
I am trying to formulate some code to run an SQL statement but it is not working.
The statement runs from a button on the sub form subOriginForm. Its intention is to collect the values from cboField1 and txtfield2 located on that form and insert them into tblTargetDB - but the whole thing isn't working.
Code: Private Sub cmdMyButton_Click() 'DoCmd.SetWarnings False INSERT INTO tblTargetDB ( field1, field2) VALUES (forms!subOriginForm.cboField1, forms!subOriginform.txtfield2); DoCmd.SetWarnings True End Sub