How Add Lines To Table?
Oct 20, 2006Hi. (I already ask how to delete rows but it looks too hard to make so I invent new idea)
How I can add lines (INSERT INTO) into table so that Access does not add lines which already are in the table??
Hi. (I already ask how to delete rows but it looks too hard to make so I invent new idea)
How I can add lines (INSERT INTO) into table so that Access does not add lines which already are in the table??
My boss made a satisfaction database that tracks satisfaction in 2 ways, so we have:
Table
ID
SatisfactionAType
SatisfactionAScore
SatisfactionBType
SatisfactionBScore
I'd like to make a query that would split these into two lines, one for A, one for B and then export it to excel.
I have created a forum that all fields are unbound. On completing it is written to the table using a RunSQL command. This writes to the table with no problem but when it does so it is creating another entry with zero content. This is the save steps with open new form
Code:
Private Sub SaveRecordAddNew_Click()
Call PreSaveCheck
If Me.saveCheck = False Then
Exit Sub
Else
Call WriteToTable
[Code] .....
I have a bound subform that lists all of the relationships from my unbound txtJobNum control and I can add and delete lines from the table directly on the subform. What I really need is to NOT update the table unless I click on my save command button.
View 2 Replies View Relatedin my report I have table made from 25 fields (5x5) and they all have the Can Grow Option turned on.
However the lines and boxes separating the fields do not grow with my fields and I get plenty of intersections and over lapping.
Is there a way to make boxes and lines grow with the text box?
I have two tables that need to be exported on one .txt file.
One table has the header record. And the 2nd table has the detail record.
My issue is as follows:
1. Need to create one .txt file
2. The header record has one set of export specs and the detail record has a different set of export specs.
3. The first line is the header record, and 2nd line is the detail record.
Example below:
H Abraham Armenta January Cake 00123
D Father Saturday 02536 00123
Both tables have a common control number - in this case represented by the 00123. I just cannot figure out how to accomplish this..
I have several tables linking our employees to certain supervisors, etc.On the Form, there is a drop down with all employees listed that someone can select and then enter the stats required. When someone leaves the firm, I want to remove them from the form dropdown list, but not delete them from the corresponding table. I have seen this in other databases where they someone added an 'Inactive' column with a Yes/No response and when you selected the inactive - yes, that name would disappear from the form when people select names from a dropdown to enter stats.how to make the names disappear from the view in a form, but not in the table related to that form?
View 6 Replies View RelatedI have a single table with customer information, one of the fields is a date field "LastContacted".
I'm creating a search form with 2 date fields (txtDate1 & txtDate2) to search a date range of the LastContacted field, and I need to write this into the query that the search form uses.
I have written this using Nz so that it can still return results if the search boxes are left blank:
Between Nz([Forms]![frm_AdvancedSearch]![txtDate1],#01/01/1989#) And Nz([Forms]![frm_AdvancedSearch]![txtDate2],#01/01/2999#)
This seems to work and it returns lines from the table where there is a date entered. However some of the fields in the table have no entry in the LastContacted field. How to code this query so that it also returns lines where the LastContacted field is blank in the table?
I have tried:
like "*" & (Between Nz([Forms]![frm_AdvancedSearch]![txtDate1],#01/01/1989#) And Nz([Forms]![frm_AdvancedSearch]![txtDate2],#01/01/2999#)) & "*"
but this returns errors when I try to run it.
I'm using Access 2010.
Managed to export a table to csv file. The problem I now have is I need to add the following Text at the start of the file:-
H,LKJ85485524,DE
and the new last line :- T,whatever the record count is,2
Whether this info is added before or after export is not important.
I have even resorted to using VBA to create an Excel spreadsheet and saving to csv.
Thought this had cracked it however I had surplus commas at head and footer where the original csv file had additional columns (ok manually delete these comas) ,then found that the end of each csv line was missing a final comma that is needed by the recipient of the file.
I need to replicate an existing report that has a number of 3 columns across the page and has 35-40 rows down the page...it's like a table in Word or a spreadsheet in Excel. I need to print the column and row lines.
Is there a simple way to include these in the report other than me drawing each and every line?
Let's say we have a table:
Sipping branchReceiving BranchProduct #Qty to ship
a c PR1 43
a d PR1 25
a k PR1 1
....
Now I want to delete all lines that have same product code and shipping branch as a privous line.
So the only max amounts for each product and each shipping branch will remain.
How to delete those lines?
Thank you.
Hi there,
LEts say I have a table
branch item $COGS
we have lots of same items having different $COGS in different branches and all of them are on one table
I sorted that descending by $COGS.
Now I want to pick for each item only 4 first lines having bigger $COGS.
The rest of the lines should be deleted.
How I can do that?
Thanks
Is it possible to create a message box with two lines?
Also I want to make a reference to the valuein a text box in the message box.
This is my code at present:
If MsgBox("ARE YOU SURE YOU WANT TO DELETE THE WHOLE EXERCISE?", vbYesNo + vbQuestion, "Warning") = vbYes Then
CurrentDb.Execute "DELETE FROM ExerciseNametbl WHERE ExerciseName = " & Chr(34) & Me.ExerciseName & Chr(34), dbFailOnError
Me.ExerciseName.Requery
Else
Exit Sub
End If
What I would like is:
"Are you sure you want to delete (The value of comboExerciseName)"
Hi, sorry my english, but I will try to explain what I try to do.
In my database I have a form, where is a listbox. In this listbox are names of documents. Problem is that the name of each document is so long (two or three lines on monitor) so it is not possible to fit in, because listbox has always only one line for each document.
It is possible to set up listbox to get more lines for each item ?
I will be very happy if somebody help me with it. Thank you very much.
Jirka
I am working with an access table populated from an excel spreadsheet due to its source if a person has more than one line of data the fileds are left blank.
Example:
ID Name Date diagnosis
01 Smith, David 07/01/2004 sore throat
02 Strep Throat
03 Broken arm
For Smith, David he had 3 diagnosis but the field date and name are blank as they would have been the same as ID 01. I have written a query to populate the blank fields:
IIF([name] is null, dlookup("[name]", "tblDiagnosisUnder16final","[Id]=" & [id]-1),[name]) This works great for lines with only one blank, but in the above example for ID 03 the name field stays blank as it is looking at field 02 which is blank in the table.
What I need is a loop to keep moving up the table until it finds a field that <> Null. I assum I should write a function and palce it in the if statement above where the -1 is but I am strugling with comming up with a solution.
Any help would be appreciated.
Mike
How would I go about getting vertical lines as column seperators down the entire page. The problem I run into is every time the row size changes there's a break in the column dividers. Someone suggested using a function in the On Print event for the report, but there is no OnPrint field in the event tab of the reports properties. If anyone ever did anything like this before, please let me know.
View 5 Replies View RelatedIs there any way of making a comments box (memo) have the functionality to press return and start on a fresh line as it all seems to run into one 'indecipherable blob'
View 1 Replies View RelatedIn a query, how do I do a count of the number of lines that appear in the query? Not the number of records, because the query itself is grouped. The results are in order, highest to lowest, and I want to see just the top 50.
View 3 Replies View RelatedHow do I number the lines in a query? I have a 'Top 50' query, and I want to number the lines 1 through 50.
View 6 Replies View RelatedRather than manually draw vertical lines on my forms, I'm looking for a way to generate vertical lines using VBA code. Has anyone done this?
Thanks,
pc
can you get automatic ruler lines to display on a report after each record is displayed?
View 4 Replies View RelatedHi, I have the following code to display the message as in the picture
Private Sub Staff_Number_NotInList(NewData As String, Response As Integer)
MsgBox "CREW MEMBER NOT IN LIST - Double clic on this field to add a Crew Member"
Response = acDataErrContinue
End Sub
What I wouldlike to do is get the message written on 2 lines instead of 1!!!
Thanks
M
i'm no noob, but i'm also not the expert, what i'm trying to do is this,
i'm taking multiple string out of an recordset and putting them in one big text box
but the problem is that after every record there has to be an enter in the text box
So for example:
record 1 =
-bla bla bla
-tja tja tja
record 2 =
-waa waa
my result in the text box must be:
-bla bla bla
-tja tja tja
-waa waa
and not (like it is now):
-bla bla bla
-tja tja tja -waa waa
who has a clue? chr(11) & chr(13) do not work, i activated "on enter go to next line"
thx in advance for helping out
I have a csv file, I am able to import it using the vba commande docmd.TransferText action. But the first three lines are made up of headers. I do not want to import these.
xxxxx,
xxxxx,
Field1, Field2, Fileld3,
Is there a way that I skip out the first 3 lines of the text file? ie only import from row 4 onwards?
Please Help
My current transfer method also creates a table of errors for the first three lines (as they do not match the data type spoecified by the target table). It also creates a whole lot of null fields in the first three rows of the table. I am running a loop for a whole lot of csv files so you can imagine I'm generating a lot of error import table. If I could import only rows 4 onwards there would be peace in the universe!
Does anyone know how to make a report have lines in it like excel can do when you print out. My boss likes to read this data with lines seperating stuff. Thanks.
View 3 Replies View RelatedI want my query to output an address in one field with carriage returns, where the address lines in the source table are held in individual fields.
So I try...
SELECT [Address1] & Chr$(13) & [Address2] & Chr$(13) & [Address3] etc..
This does not work.
However, if I use a text box on a form, with "New Line in Field" set, and then in code use Sendkeys to post the address and the carriage returns as above, it does work.
Can this be done simply in a query? If so how?