Topics Search

Empty line inserted in database

Empty line inserted in database
Views: 2
I have a sales form, and a sales_lines form.

When I enter the details of a sale I can click on the "Add sales lines" button which opens the sales_lines form (the sale_ID is passed on to the sales_line form). In sales_lines form I can edit all the line items for that sale and then I perform a pretty straight forward insert SQL.

This is the only place where I have an Insert sql line (not very far in development.). I did not remove the alert for sql commands on my table so I get the popup saying "We will now append 1 row into sales_lines table". However after I create a sale with for example 3 sales_lines, and I get 3 popups each saying "we will append 1 row" I always end up with 4 lines in my sales_lines table. The first one is empty and then the 3 others are the ones I entered.

Does anybody know where that might come from?
Sponsored Links:

More topics


Combining Text Files using DOS

I am having some problems. Right now I have a code that combines files using FSO but for some reason it has been adding an empty line to the end of files and if the file has an empty line it combines that empty line.

The programs that run off these files cannot read this empty line correctly and blow up. I have asked programming to just fix this (very simple fix) but they are pretty dang stubborn over there.

I have looked at using the Shell cmd but I cant get it to work. Any suggestions? Btw right now I am appending all files in the specified folder, running through a loop, and combining them if they match certain criteria

Formatting Inserted PDF file in report

I am using Access (2000, don't laugh) to allow my staff to quickly enter data into a PDF form.

I've inserted the PDF file as an object, I can line up the fields to fit the representative boxes on the form.

My Problem. The inserted file does not match the size (8.5 X 11) of the original document and when I re-size it, it prints out disproportionately. (i.e., When I place up a form from my report behind a blank one printed directly from the file, and hold it up to the light, the text and images do not line up.

I have tried changing size mode to "zoom" and "stretch". It comes close, but not exactly. These forms will be scanned by the recipient and must line up as the originals

additional detail records to be inserted

I have a report that prints out as per the number of records into the detail section. however, I need to ensure that even if there fwere than 14 records, that the number of line items totals to 14.

in other words if 5 there are 5 records, there must 5 lines in the detail section with the relevent information and 9 empty lines.

Then if there are more than 14 records, a 2nd page must print out but in exactly the same way as the first ie: if there is 16 records, the first page must have 14 in the detail section, te2nd page must have 2 lines with the relevant records and 12 empty lines.

How to find the most recent inserted auto number is?

In one of the forms is a Parent / Child situation. The program inserts the parent then allows the children to be inserted or updated. The parent and children are related by an autonumber database table column called CustomerID. After a parent is inserted into the database I would like to find out what that autonumber ID is so I can use it for the child data.

Importing Table "DESIGN"

My company has a database that allows us to print report data based off information relating to 'aged care' facilities. each of our facilities has its own seperate access database.

there is also a control database, which is empty, that has the formatting of all the other databases. basically the plan is, as the facility databases adapt and change, I change the empty database aswell so that any new facility database I make will have these new changes.

my problem comes when I need to update all the OTHER facility databases. what I have been doing is importing reports, forms and queries from the empty database and all has been fine. HOWEVER, I have not had to update the design of a table until now. im sure you see the problem now, when I import a table from the empty database, naturally, it is empty, so it deletes all the current table data I have in database im updating.

So how do I import only the table design and not the empty data

Skip a line

When writing a SQL expression, is there a command to skip a line?

I have written a SQL expression that works fine. However, when the query comes up on my screen it is a long list and a little daunting. I would like a space or skipped line or empty row before it prints the next data.

Convert text to number in a union query

As it says on the tin!

The three individual queries are ok but some of the columns for one query are empty which I have inserted. Is it this causing the problem

Skip a line in SQL expression

When writing a SQL expression, is there a command to skip a line?

Am I asking this correctly?

I have written a SQL expression that works fine. However, when the query comes up on my screen it is a long list and a little daunting. I would like a space or skipped line or empty row before it prints the next data.

I am still not sure if I am asking this right.

imprting text from Excel

I have an Excel workbook that contains cells with a lot of text. The text contains line-breaks. These were inserted using Alt+Return. (Return on its own does not produce a line-break, but moves you to the next cell.)
When I import this table into Access, the line breaks are removed.
I have the same problem if I try just to link my Access table to the Excel workbo

2nd Line Of 2-line Text Field

I have an address database where the data entry form accepts two lines in the Street field. Queries only return the first line. How do I get to the second line in a query? How to interogate only the second line, when present?

Using Access 2002. Would rate myself an intermediate user