Insert A Record To A Specific Spot

Aug 29, 2006

Creating a flight management database to create flightplans that determine local/zulu times and dates of each leg of the flight. Arrival and departure times are calculated by durations entered for flight time to get arrival information, and time on the ground to determine departure time/date.

My question, is there a way for the user to insert a record (leg) into an exisitng flight plan that they are editing? The legs are currently in order by an autonumber so inserting a new record would not necessarly put the legs in the correct order of the flight.

Currently, the user only needs to enter the airport identifier and air/ground time along with initial departure time/date. No dates are needed for each leg.

Thanks

View Replies


ADVERTISEMENT

Sorry If This Is The Wrong Spot...

Apr 12, 2005

Ok...Access newbie here..VERY newbie..

I am trying to get colum "Age Group" in table "A" to autofill based off of info from colum "Age" in table "A" AND colum "Age" in table "b" and corresponding colum "age group" in table "b"

table "b" looks like this:

Age AgeGroup
17 17-19
18 17-19
19 17-19
20 20-25
etc

I am looking for table "a" to look at the value inputted by the user in the Age colum of table a..compare it to the age colum of table b and return the correct age group in the appropriate colum of table "a"

Hope I explained myself..thanks for any help!

View 4 Replies View Related

Spot The SQL Mistake

Nov 24, 2004

Here's my code


Code:Dim mysql1 Dim childid As String Dim Info As String Dim inputch as string dim inputin as string inputch = "Please enter the ID number of the young person" inputin = "If you have any comments about the young person" childid = InputBox(inputch, "Add young person", "") Info = InputBox(inputin, "Comments", "") Text16.SetFocus mysql1 = "Insert into [Activity ID] (ActivityID,ID,Information) Select [Forms]![Activityinfo]![Text16].Text, childid , Info" DoCmd.RunSQL mysql1

When I run it, It does the two input boxes fine, but it then asks you for the value of childid.. ?

any help is appreciated

Paul Kent

View 2 Replies View Related

Spot The Syntax Error

Jun 27, 2007

Hi there!

My first post here, and I'm hoping some kind soul will be able to help me (as you can tell, I'm a kinda needy type!!) :o

I've got two completely separate databases, for both of which I need to be able to print a single form at a time. No problem there, a report and a bit of code solved that - but only for one of them! This is the successful one:

Private Sub cmdPrint_Click()
On Error GoTo Err_cmdPrint_Click

Dim stDocName As String

stDocName = "Issues"
DoCmd.OpenReport stDocName, acNormal, , "Issue_No = Forms![Concessions]!Issue_No"

Exit_cmdPrint_Click:
Exit Sub

Err_cmdPrint_Click:
MsgBox Err.Description
Resume Exit_cmdPrint_Click

End Sub

For my other database, I simply cut & paste the code, then changed the relevant document fields, as below:

Private Sub cmdPrint_Click()
On Error GoTo Err_cmdPrint_Click

Dim stDocName As String

stDocName = "Change Proposal Print"
DoCmd.OpenReport stDocName, acNormal, , "Issue No = Forms![Change Proposals]!Issue No"

Exit_cmdPrint_Click:
Exit Sub

Err_cmdPrint_Click:
MsgBox Err.Description
Resume Exit_cmdPrint_Click

End Sub

But when I try to run this, all I get every time is: "Syntax error (missing operator) in query expression '(Issue No = Forms![Change Proposals]!Issue No)'".

I can't for the life of me figure why one works but not the other. I've checked and treble-checked that I've got exactly the right document names. The report is "Change Proposal Print"
The form is "Change Proposals"
The form field criterion is "Issue No" (without an underscore in this one.)

What operator could possibly be missing in the second one, but not the first? Am I being very dense? Can anyone out there help? (Am I asking too many questions in a whiny voice?) :confused:

Cheers,

mike b :D

View 4 Replies View Related

Forms :: How To Hyperlink From Query To Specific Record In A Specific Form

Jul 23, 2013

I want to hyperlink from a query direct to the relevant record in a specific form. I have a hyperlink field in the form which shows up in the query. When clicked in the query, this hyperlinks to the form but I cannot make it select the correct record in the form.How do I get it to select the correct record?

View 3 Replies View Related

How To Insert Subform Data To Specific Table

Oct 1, 2013

I have problem with inserting sub-form data to specific table. i have 2 table and one form.

table A is for DLOOKUP, table B is the table i want my sub-form data to insert in.

my table A have ID,name and class.

my table B have ID and other column.

Table A' ID and Table B' ID is related.

i trying to insert my sub-form to table B instead it insert the data to table A.

View 1 Replies View Related

Insert Date And Specific Time Into Textbox

Jun 1, 2015

I have a form for creating projects in a database. I originally set this up with 5 buttons for when the project is due to be at 1 hr, 2 hrs, etc. Now, they "management" want me change two of these for end of shift of on the current day and start of shift for the next day. This is the code I had before for the 6 hrs:

Private Sub Command152_Click()
Me.DueTime = RoundTime(Now() + 6 / 24, 1800)
End Sub

View 8 Replies View Related

Insert New Field With Specific Data Type In The Table?

Apr 24, 2014

i wanna to insert a new field in the table ... which fill automatically with the date in which i modified the data in this record ...and then i'll insert this field in a report

View 1 Replies View Related

Insert Specific Fields Into Mail Merge To Refine Terms?

Nov 19, 2013

I'm working on a Word mail merge feature that links to an Access Database and would like to know if you can insert specific fields into the mail merge to refine the terms? example below:

<<Customer Name, [field 2]>> - Or something to that effect.

^The mail merge would know where to obtain the customer name from anyway, but will it select information from the field that is being referenced?

View 2 Replies View Related

Locking A Specific Field Of A Specific Record

Oct 3, 2005

Hello, I have just spent ages doing searches and reading everything I can on locking. But, I have yet to find an answer as to how I can lock a specific field in a specific record.

e.g. Staff enter customer details, then at the end of the day the admin (me) checks it over and presses a big old button that stops them from locking certain fields in the current record only - they must still have access to the unlocked fields of the current record, and it must not lock any other records.

I'm guessing there's some VB code in the form of fieldname.lock = true, but then it locks the field throughout the whole table!

Can anyone tell me how to do this please?

View 11 Replies View Related

Forms :: Copy Specific Fields From Selected Record To Specific Fields In Subform?

Jul 9, 2015

I am new to access i have a problem which is i have made a form which contains a subform and a read only subreport, what i want is the ability to select a record in read only subreport as in the picture attached and make a button that when i press on it, it should copy the values of the itemsID field, Packing field, ContainerNo field and origin field from the selected record and then paste them in the subform below.

Also i want to add more then one item, so the when i press on another record it should paste the values below the first record.

View 12 Replies View Related

Forms :: How To Get A Specific Record To Be First Record Of Continuous Form

Nov 8, 2013

I have a continuous form for which the recordsource is a query that retrieves dates from 10 days in the past to 10 days in the present. I want the record with today's date to be at the top of the form. The record with the oldest date is always on top. Is this a scrolling issue? How can I get the record with today's date to appear on top?

View 5 Replies View Related

Can't Insert A New Record

Nov 11, 2011

I am using an Access form that I created on an earlier version of Access and I have been able to insert (add) new records with this form and database.

Recently, I added some text, moved some text around on the form, and saved the form.

Sense my revisions, I am unable to insert (add) new records. (The "New" button in the software's header is grayed out.)

I have saved and compacted/repaired the form/database, but this did not solve my problem.

View 4 Replies View Related

May I Insert A Record Into The Top Of A Table?

Nov 4, 2004

May I insert a record into the top of a table?
Please help me! Thanks very much!
My email: jokelogpop@yahoo.ca

View 9 Replies View Related

Insert A Record Between Two Records

Jul 20, 2005

Hello

I have created a table of Some machines specifications.

Item Name Type location
1. Sieve156 Sieve 3rd floor
2. Rollermill1 Mill 1st floor
....
...
...

When inserting for example a new sieve machine I want database
add automatically this machine between items 1. and 2. and assign the item
number 3 to rollermill1. but this new record is added to the last row and its
item number will be 3 but it should be 2.
What shall I do for this problem? (in excel it is easily possible to add a row
between two rows.. is it also possible in access?)

thank you

View 6 Replies View Related

Insert New Record Disable

Sep 27, 2007

Hiya,

I've inherited an Access 2003 database, a rather complex one. The database has a login, with the credentials stored in a table which I can view (minus the pass, which is masked). Of course, for security reasons, I shouldn't be able to just add a record and create a new ID, in essence bypassing all security. As such, the table with the user records does not permit new records to be added. What steps need I take to add new records, the option being greyed out in the interface, no new record bar available at the bottom of the table.

Any insight is most appreciated.

Slawek

View 1 Replies View Related

VBA - Insert A Record From One Table To Other?

Aug 15, 2014

In my VBA code, i am trying to move some table records from table1 to table2. Both table1 and table2 has exact structures.

In the INSERT statement for table2, what is the easy way to insert a record from table1? I am trying to avoid having to specify each field name in the INSERT statement. Because, i have 100 fields in table.

Is there a way to INSERT a particular record from table1 to table2 without having to specify field names in the INSERT statement like in below example?

INSERT INTO Employees " _
& "(FirstName,LastName, Title) VALUES " _
& "('Harry', 'Washington', 'Trainee');"

View 1 Replies View Related

Cannot Insert A Null Value Into Table Record

May 2, 2007

Using the sql profiler gives me no clue.

This is the insert query from the profiler.



exec sp_executesql N'INSERT INTO "ENVIS_GSD".."wat_springflow" ("result_dt","site_id","result_va","remark_tx") VALUES (@P1,@P2,@P3,@P4,@P5,@P6)', N'@P1 datetime,@P2 int,@P3 float,@P4 nvarchar(4),@P5 varchar(3),@P6 datetime', 'Feb 10 2009 12:00:00:000AM', 3000723, 8.000000000000000e-001, N'test'



The two records that I get the proplem on are not included here, but somehow they have been updated. I traced the access code, but I could see no reference to them that they were used for the update in either the form or any modules called.

Somehow up to a few weeks ago those two columns were updated.

Tracing the code and using the immediate window the user_name variable stores the login name corectly.

Someone mentioned "error 28" any ideas?

Thanks in advance

View 1 Replies View Related

Accessing ID Of Last Record Right After You Insert It Into Table

Apr 13, 2005

Hi folks,
I have an Append Query (Insert Into...) that I use to insert values into a table from a form. But to have that tie into other tables I need to gather the Student_ID (primary key) that is autogenerated when the record is inserted. How do I do this? I want to store it in a public variable. I've done quite a bit of searching but nothing of any value has turned up. Please help.

What I have on button press:
DoCmd.OpenQuery "Register Camp Students"

After that I need something to gather that newly inserted Student_ID and store it for later use. Please help!

Ciao,
jawilli1 :confused:

View 4 Replies View Related

Unbound Controls To Insert Record

Jun 12, 2006

Hi guys. I hope someone replies to this thread....I am struggling with this one.

I am developing an Asset Management System for our IT Equipment.
We wish to record the software installed on each PC.

The Manufacturer and Software names are stored in separate tables.
The AssetMain table has a one-to-many relationship with the AssetSoftware table.

I originally had a (continuous) subform for software on my main Asset form. However, as I am using cascading combo boxes (to filter the Software Combo by the Manufacturer) it mean that changing the combo on each record would appear to change the existing values too (common problem).

I would therefore like four unbound controls.
1) Combo Box - Manufacturer
2) Combo Box - Software Package
3) Combo Box - Package Edition
3) Text Box - Serial Number

When the user selects/enters these values and clicks an "Add" button I would like add a new record into the AssetSoftware table where Asset_ID = Parent.Asset_ID.

I will then have a list box that queries the software for that particular Asset. This will requery on each CmdAdd_Click.

Attached is a screenshot of what I would like to achieve (if I click Add it should add Microsoft Office XP to the list box below)

Would really appreciate some help (do not normally get many replies to my threads :( )

Thanks
BF

View 7 Replies View Related

Insert New Record To An Autonumber Field?

Jan 31, 2005

So, I have a table with an autonumbered key field. I started the autonumbering at 1000 thinking that I may want to manually backfill some old records at a later date. Now I’m stuck.

Is there a way I can insert a new record into this table, filling this field as “950” for example?

View 3 Replies View Related

Modules & VBA :: Dmax After Insert Record

Aug 8, 2013

after I insert a new record using INSERT INTO and then use DMax() (in a private sub) to look up the new record. About half the time DMax() pulls the new record based on the primary key field (AutoNumber) just fine. However, half the time it pulls the max record prior to the new record being inserted. I.e. record 1001 was added and DMax() pulls record 1000. I'm assuming that my issue has something to do with the timing of when the record is writen/saved in the table. Is there a simple method of refreshing the table that I can use prior to using DMax()?

View 2 Replies View Related

Queries :: Insert Multiple Record

Apr 11, 2014

I have 2 table and the relation between the 2 table are [Booking_Num]

Code:
table A: [ID],[Booking_Num] [Prod_Name],[Qty_Order]
table B: [ID],[Booking_Num],[Prod_Name],[Date_Out]

when I get insert to table A, should be the table B get many record base on [Qty_Order]..?
sample:

Code:
table A
ID | Booking_Num | Prod_Name | Qty_Order |
01 | BOK001 | Hammer | 4 |

table B
ID | Booking_Num | Prod_Name | Date_Out |
01 | BOK001 | Hammer | Null |
02 | BOK001 | Hammer | Null |
03 | BOK001 | Hammer | Null |
04 | BOK001 | Hammer | Null |

View 1 Replies View Related

Go To A Specific Record

Mar 3, 2005

Hi,

Does anyone know some code that will take me to the record whose field "A" has value "B"?

It sounds very simple but I can't find anything the does it!

Basically I have a table or enquiry records, some of which are related. I just want to be able to click on a button to take the user straight to the related record. The current design does this using a filter but this is pretty rubbish as it meanhs that in order to search on all records I need to select all records again first.

View 1 Replies View Related

Go To Specific Record

Sep 29, 2005

The following is a function in my Form "Enter"

--------------------------------------------------------------------------
Private Sub PoNum()
Dim strForm As String
Dim strwhere As String

strForm = "GoodOne"
strwhere = "[Forms]![GoodOne]![Orders3].[Form]![PO_Num] ='" & txtPO & "'"

If [txtPO] <> "" Then

If DCount("[Po_Num]", "Orders", "[PO_Num] ='" & txtPO & "'") = 0 Then
MsgBox "Sorry, No record matched"
txtPO.SetFocus

Else

MsgBox "yes"
DoCmd.Close acForm, "frmPopUp"
DoCmd.OpenForm FormName:=strForm, wherecondition:=strwhere
End If

End If

End Sub
------------------------------------------------------------------------

"Orders3" is the subform of Form "GoodOne" .
When the user enter the PO Number in txtPo, and press "ok" , it will go to
that record.
BUT it just show a new blank reocrd instead.

What's wrong with the programme ??? (is it the matter of subform ?)

Thanks

View 3 Replies View Related

Need To Insert Blank Rows If Record &lt; 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







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