Insert Blank Row

Feb 20, 2008

Can someone tell me how to insert a blank row after every 4th row of data?

Here is the query:

SELECT B.NAME, B.WORKER, C.[SUB SYS] INTO D
FROM B, C;

data comes back like this
NAMEWORKERSUB SYS
GORDON N PAUL0000ACRT
GORDON N PAUL0000AENF
GORDON N PAUL0000AFIN
GORDON N PAUL0000ARAP
GORDON N PAUL000ATCRT
GORDON N PAUL000ATENF
GORDON N PAUL000ATFIN
GORDON N PAUL000ATRAP

I want it like this

NAMEWORKERSUB SYS
GORDON N PAUL0000ACRT
GORDON N PAUL0000AENF
GORDON N PAUL0000AFIN
GORDON N PAUL0000ARAP

GORDON N PAUL000ATCRT
GORDON N PAUL000ATENF
GORDON N PAUL000ATFIN
GORDON N PAUL000ATRAP

View Replies


ADVERTISEMENT

Tables :: Use Insert Into Command To Insert Filepath Into Table That Adds Blank Label

Aug 28, 2014

I am at work, and I have acquired a database that prints labels. They now want the database to be coded so that after certain labels are printed the database will print a blank label. I have the code figured out as a Do While statement in order to print the blank label. The problem I am having is that I am trying to use the Insert Into command to insert the filepath into the table that adds the blank label.

|DoCmd.RunSQL "INSERT INTO Rod_tmakLabels ( Print, [Order] ) SELECT Yes AS Expr1, 'Rods Labels' AS Expr2"|

If I run the above command, it just adds the text "Rods Labels" at the end of the table. Is there anyway with the INSERT INTO command that I can insert the new label between the 2nd and 3rd row and add another row? Or is the command designed only to add a new row to the end? I haven't had any luck searching for this yet.

View 1 Replies View Related

Insert Multiple Blank Records

Apr 26, 2006

Hi,

I'm new to Access and I've run into a little problem. I've created a table with a primary key (autonumber) which will contain 1520 records. At present I only have data for the last 8 records. Ideally I would like to create 1512 blank records, with only the autonumber entered e.g. 0001, 0002, 0003 etc.

Unfortunately I cant add the data that I have got to 0001 - 0008 as it relates specifically to the primary ID.

Thanks.

View 10 Replies View Related

Queries :: Insert Blank Rows At Once?

Oct 2, 2013

How to insert x number of empty rows at once in a query? All fields allow null.

Say, if I wanted to "resize" the table to 3000 records...

View 6 Replies View Related

Need To Insert Blank Rows If Record < 1000

Mar 24, 2005

Hello all!

I have a database that needs to post records that are joined from three different sources into a table. The query is done, and I get about 1,489 records out in 4 different states.

What I need to do is make a table with these records. Furthermore, it must be separated by state, whereas if there are less than 1000 records for each state, it must insert blank lines until it reaches then next thousandth (sp?) row (i.e. 1001, 2001, etc.), and then start posting the next state.

For example, AZ has 420 records. There has to be 580 blank lines before the query can start posting the next state, CA. At row 1001, CA starts posting, but there are only 200 records for CA so there must be another 800 blank lines before moving on to CO at row 2001, etc. etc.

Anyone have any ideas on this? Thanks!

View 5 Replies View Related

Reports :: How To Insert Enough Blank Line In Order To Make Each Report The Same Length

Aug 22, 2013

I have a main report / subreport relation, just want to have a fixed length of each printout. e.g the total number of lines of the subreport should be 8 lines. However, lots of subreports contain records less than 8. I would like to know how to insert of blank line in the subreport depending on the records with content at each print, in order to make the total number of lines in each subreport is 8 each print!!

View 1 Replies View Related

Queries :: Pulling Records Based On Blank / Non-blank Criteria

Jul 18, 2013

I have a couple different reference files that get updated each week. Sometimes there are missing data elements, so I'd like to structure a select query to show me those records that have blank elements but I'd like the similar records to be pulled in as well, so I can make a determination as to how to populate the blank records..

See attached example: I have a client ID reference table that gets populated with forecast owner names (individuals responsible for the customer) from a couple of different sources. Sometimes there are names attached and sometimes the field is blank.

How can I structure a query to show me just those Client ID's that have multiple entries with blank AND non-blank forecast owners? I'd also like to exclude single/multiple records where there are only blank records...

View 3 Replies View Related

Query Criteria With Blank And Non-blank Text Records

Mar 13, 2007

OK, I have been searching around on the fourm for over an hour now...I give up. If this is some where else, I am sorry.

I have a database of maintenance data. There are several columns that are usually filled in, some records have some columns blank. They are formated text because they hold letters and numbers (see pic).

I am using a form to query the table...no problem. The form has text boxes the user filter down the data

The problem comes are with the results of the query. Any record that has a blank column is not retuned. I am using "Like" so that the user can enter in partial codes. I know "like" won't return "null" records.... Help!

Things I have tried:
1)IIF(form field is blank, return table field, else use like command to filter) - returns nothing!
2)Like "*" & [Forms]![Fleetwide_data_Request]![MAL_CD] & "*" returns all records without blanks (i.e. missing data)

what else can I do?


Thanks

View 5 Replies View Related

Blank New Form Is No Longer Blank?

Apr 11, 2006

Hi guys,

I have been running the same database on numerous systems for 5 years and the user clicks on a button and using this code;

DoCmd.OpenForm "Employee", acNormal

Simple !, this always opened this form blank, without applying filters, ready to accept a new employees details.

But now this no longer works, for no apparent reason?
What happens is that it opens with the form fields filled with the first person in the Databases details instead of being blank.

The only thing that could have changed is that i converted the database to 2003?

Any ideas?

Thank you in advance

View 5 Replies View Related

Forms :: Way To Continue To Blank Form After Entering Information Into Previous Blank Form?

Mar 25, 2013

When entering information into a blank form, I would like to be able to continue entering information to another additional blank form after my last entry. Is there a way to continue to a blank form after entering information into the previous blank form? I would just like to continue without having to close the entire form and then reopening another form.

View 7 Replies View Related

INSERT Query - Insert New Data Only

Jul 2, 2010

Table TBL_NEWDATA is used to append new data to table TBL_PERSON_ALLOCATIONS.

TBL_NEWDATA { Person_ID, Department_ID }
TBL_PERSON_ALLOCATIONS { Person_ID, Department_ID, ... }

I need to devise a query to append data for a particular Department_ID from TBL_NEWDATA to TBL_PERSON_ALLOCATIONS where that data does not already exist there. i.e. for Department_ID 'Research', I would want to append 'Person_ID', 'Department_ID' (in this case: 'Research') to TBL_PERSON_ALLOCATIONS for any tuples not already held.

INSERT INTO TBL_PERSON_ALLOCATIONS (Person_ID, Department_ID)
SELECT Person_ID, Department_ID
FROM TBL_NEWDATA
WHERE TBL_NEWDATA.Department_ID='Form...'

[code]...

This Query takes a single argument from a control (Forms!Main!IN_Department), and this is the Department_ID to be updated.Is there any way to do this using a single query or will I have to use sub queries? I'd hoped not to as to keep the database as concise as possible.

View 2 Replies View Related

Queries :: Insert Into One To Many PK And FK Insert

Mar 25, 2015

I have a normalized DB with one to many relationships, using Primary and Foreign Keys.

I need to do inserts and maintain the PK/FK relationship, which means when I add a new PK I need to insert that PK as FK in other tables in the same transaction.

How do I do this in Access? SQL Server I use transactions, but I can't lock up the tables in Access like that.

I did a bunch of searching and found nothing, which leads me to believe I am way off in my thinking. Below are the dirty details

I have 2 tables, tblName and tblPhone. 1 name can have many phones.

tblName has PKName. tblPhone has PKPhone, FKName.

I have a form where user enters a new Name and PhoneNumber.

Name gets inserted to tblName, assigned with PKName = 100

Phone should get inserted into tblPhone with PKName.

IE Insert into tblPhone (FKName, PhoneNum) VALUES (100,"212-555-1212").

The dumb way I am doing it now is I insert to tblName, query tblname for the PK, then write to tblPhone. This can't be right.

View 2 Replies View Related

If Blank Then....

Aug 24, 2006

I was wondering if there is a way to have a default value in a table field which is dependant on whether there was data enterd in said field or not. For example. I do not want any blank fields on my table instead I want "N/A" in the fields that were not used. I have tried setting the "default value" of the fields to N/A and it does work. The only problem is that all of the fields are filled with N/A automatically and in order to enter data one has to delete or "overwrite" N/A. Is there a way that N/A will be entered ONLY if the field is skipped over and left blank.

"Using way too many quotation marks"
Brad

Thanks

View 5 Replies View Related

Blank Fields

Jan 19, 2006

Hi - I have what maybe a relatively easy problem to solve.

I have a list of locations each with a unique id. I also have another table with location details in it. There is a relationship setup between the two tables. However in the first table I have some locations that do not have a match in the second table. Therefore that field is left blank. When create a query to show information from the two tables, any records that have a blank location match field do not get shown in the output. Is there anyway to display records with blank fields?

Thanks

Nick

View 4 Replies View Related

Blank Form

Aug 21, 2006

Hi,

I have created a switchboard for a very basic DB and the first button is "ADD A NEW ENTRY"
When I click on this a form comes up but it bears the data from the first record.
How can I edit it so that a blank form comes up ready to receive data?

Best regards
Keith:(

View 4 Replies View Related

Blank Out Field.....??

Feb 18, 2007

Hi all

I have a numeric field in a form which initially is set to 0. When the user clicks or tabs to this field, it is blanked out in the got focus event by setting the field to "". This works great. Now, if the user exits the field by clicking elsewhere or tabing out of it, without entering a value, I would like the 0 value to be inserted again. I have tried many things to make this work without any success. Is there someone who knows the right way to do this?

Thanks in advance

View 2 Replies View Related

Blank Forms

Jul 6, 2007

Good morning,

How do I print blank forms in Acccess?
tia Terry

View 1 Replies View Related

Blank Row In Query

Jul 20, 2005

Hi,

this is a quickie with regards to query. When I execute a query I get my result back along with a blank record.

How is this prevented ?

my user has a mouse wheel which takes them to the blank record if they move it.

Thanx in advanz.
Niall.

View 2 Replies View Related

Blank Spaces

Nov 28, 2005

Hello,
I have the following SQL query that runs perfectly. Now I need to put some blank spaces in between for the first expresion (EXPR1). At the moment, as you can see, brings me the 4 fields together.

I have tried using + ' ' + and + " " + but it won't let me as it says that the syntax is Incorrect. What should I use to get spaces?
Thank you!

**********

SET @SQL = 'SELECT dbo.brnch.addr + dbo.brnch.suburb + dbo.brnch.state + dbo.brnch.PIN AS EXPR1, dbo.individuals.posit, dbo.individuals.phn, dbo.company.name

FROM dbo.company INNER JOIN
dbo.brnch ON dbo.company.ID = dbo.brnch.com_ID INNER JOIN
dbo.individuals ON dbo.brnch.br_ID = dbo.individuals.br_ID INNER JOIN

WHERE dbo.brnch.country in (' + @OrderList + ') '

EXEC(@SQL)

View 1 Replies View Related

Blank Queries

Sep 18, 2006

Hi I have a query where i search for data based on user names. I am trying to make my query show a message when there is no data from the query.

As this is affecting my form by loading a blank form therefore my EXIT button does not appear and i can not exit the form

Hope this makes sense

View 3 Replies View Related

Drawing A Blank !

Aug 11, 2005

I have a table with three fields:
SSN
Member #
Case #
I want to create a form that I can search by SSN or Member # which will show all Case #'s known to the SSN or Member #.

A member can only have one SSN and one Member # but many Case #.

I've done this before, but can't remember how, can anyone help?

View 1 Replies View Related

Odd Blank Page

Nov 23, 2005

I have a problem which occasionally surfaces.
When trying to use an edit form nothing comes up but a blank page. No fields, nothing. The database is split and when I open it. It shows as read only. The database is only used by myself and another and the other is not accessing it. I've tried closing and opening the database and also compacting and repairing but there is no difference to the particular form.
the problem is cleared up the next day when the db is accessed again.
All other forms are ok to use, and there are now 2 forms which this happens to. Has anyone experienced or seen something similar?

View 1 Replies View Related

Blank Form??

Dec 1, 2005

I'm creating a form, from various tables, all linked accordingly. But when I run the form report wizard, I insert all the fields I need, then when I preview the form, its blank?

Ay ideas?
Thanks

View 1 Replies View Related

Blank Out Certain Fields

Mar 21, 2006

In an Input form, how can I blank out certain fields such that the field data is shown, but grayed out, and other fields are shown normally?

View 1 Replies View Related

Calendar Allow Blank

Aug 25, 2006

I currently have a textbox on a form where on mousedown it launches a calendar and on click it allows me to select a date. It has a validation rule that controls what date can be selected.

However, if I go to a record that has a date entered in the textbox and try to delete the value then the validation rule kicks in. How do I modify it so it will allow me to enter a blank value?

Private Sub Calendar1_Click()
If Calendar1.Value >= (MDate1 - 7) Then
MsgBox "Cancellation must be at least seven days in advance of the first meeting.", vbOKOnly, "Cancellation Date"
Else
CDate1.Value = Calendar1.Value
CDate1.SetFocus
Calendar1.Visible = False

End If
End Sub



Private Sub CDate1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Calendar1.Visible = True
Calendar1.SetFocus
If Not IsNull(CDate1) Then
Calendar1.Value = CDate1.Value
Else
Calendar1.Value = Date
End If
End Sub

View 3 Replies View Related

Iv Drawn A Blank

Jan 9, 2005

Hi There
Iv created a query that gets its criteria from a search form.
The query returns All values until I put in the parameters
at which point the query returns a blank My SQL is as follows......

WHERE (((Products.catagory) Like "*" & [Forms]![FrmRepOrdersByCatagory]![CbxOrdersByCatSearch])
And ((Orders.orderDate) Between [Forms]![FrmRepOrdersByCatagory]![TxtBegginningDate] And
[Forms]![FrmRepOrdersByCatagory]![TxtEndDate]))

Any advice on the code or what else it could be would be great.

Thanks

View 2 Replies View Related







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