No Current ID

Jul 19, 2005

There's this problem that has been racking my brain all day. I have a form that contains a subform (modelling a many to many relationship). So a person and the applications he/she uses. I then have a combobox with a list of applications and a button below the combobox. When something is selected from the combobox and then the button is pressed, the application gets connected to the user. The problem I'm having is that say a person is just being added and no information is entered yet. If the user tries to add an application, my code tries to tie the two key's (autonumber id's) together (but there isn't one yet for the non-existant person) and the code blows up. Shouldn't access just make one when the form is opened? I guess access waits until there is data added in order to create a new primary key.

So I really don't have a clue how to solve this issue. I tried just running an insert SQL statement but I have no data to insert. And then, I would have to use a DLookup for the id, but I would have nothing to search on. I really don't know how to fix this problem. Any ideas?

View Replies


ADVERTISEMENT

Forms :: Goto Form With Current User And Current Date

Aug 27, 2013

What I really need is for when the form opens, it looks at todays date, then matches current user and then goes to that record for today, if no current user there, then will goto new record..

i know, sounds complicated, and probably is really easy, but my heads not with it today, as about to get drunk as its my 40th, and got people ringing and texting and still trying to get this done....

I've included a copy of this database, named Timecards..

View 1 Replies View Related

Get Current Row

May 19, 2005

hi,
I have a simple qst. I have a subform that I show as a grid.
I have a field called importe that I need to do an insert with it when I press a button on my form.
The thing is.
How Can I get the current row of the grid in the subform?
After I get the currentrow, How can I insert this value on a variable via vb script?
I'm using access 2003
thanks
MAriano

View 1 Replies View Related

Current

Aug 23, 2005

I need a query so that only date in the current week ending are shown i.e. so that the query automatically updates every week to show the latest data for the week ending.

Cheers,

Andy

View 4 Replies View Related

Current Db Projects

Jun 13, 2005

Just curious as to what others are working on. Here is what I'm in the middle of and what the basic purpose is:

It's a db to track parts we swap with our customers. It's primary table is on a sql sever so that the anyone in our company can view only the data via DAP's. The other tables are in the .mdb on the file sever. I plan on having it up and running in the next week or so. It will be used (add/edit,etc data), by approx 8-15 users in three different buildings off a file server share folder...

See screen shot attachment.

View 8 Replies View Related

Getting Current User ID

Apr 18, 2006

I'm creating a database for a college assignment, and for this database, I need to record the current user ID when a record is created/updated. But I dont know the function (like, Now() returns the current date/time) that gives me the user ID. The help files are awful and I cant find the function I need =(

View 2 Replies View Related

Current Month

Jun 9, 2005

Hi

Probably an easy one here.. Got a table that I will like to do a query on.. All I need is to list all records for the current month. So obviously, when it goes to the next month, the query would update and show only records for that month.

What do I need to put under the date criteria to get this query?!?.. Any ideas?

Thanks
Saifon

View 3 Replies View Related

Need Current And Next Instance Of A Job

Jul 6, 2005

Hi,

I have around 50 jobs on a table. These have a 'start date' of various dates in a year. A field called 'complete' indicates whether a job has been closed off or not and a field called 'frequency' determines how often the jobs recurr (in days).

I need a query (which I'll run every night) which will examine all the incomplete jobs on the table and copy all this data to new jobs and change the 'start date' to the previous 'start date' + 'frequency'.

That in itself is not the problem. My problem is how to tell Access that when the current and next instances of a job exist, not to copy it a third time.

In other words, after the query runs there should always be 2 instances of the job on the table...current and next.

Can someone please advise me what I should do?!

Thanks in advance

View 2 Replies View Related

No Current Record

Dec 12, 2005

I have a query that pulls all orders out of 3 tables that fit specific criteria.

tblLotInfo.WOSD = Between ([tblLotInfo].[WOSD])<=Date() And [Forms]![frmRaisedPanelLots].[EndingDate]

tblDelivery.Status = <>"On Floor" And <>"Floor Hold" And <>"On Floor LV Losee" And <>"On Floor LV N. 5th" And <>"On Floor ONT Cucamonga" And <>"On Floor ONT Locust" And <>"Shipped" And <>"Installed" And <>"Invoiced" And <>"Completed" And <>"Cancelled" And <>"Returned to Floor LV Losee" And <>"RETURNED TO FLOOR N. 5th" And <>"Returned to Floor ONT Cucamonga" And <>"Returned to Floor ONT Locust"

tblLotInfo.DoorStyle = Like "*eagle*" Or Like "*H/E*" Or Like "*RP*" Or Like "*F/E*" Or Like "*CC-23R*" Or Like "*AR-756*" Or Like "*Deco*"

This query works fine through 12/29/05. Anything date entered after that gives me "NO CURRENT RECORD". I don't know why. We have orders through Feb of next year scheduled. Any help would be greatly appreciated!!

View 2 Replies View Related

Current Date +1

Feb 24, 2006

I want the query to return the results of all records that are for the next day.
Sort of like =Date() +1

Please help

View 1 Replies View Related

Selecting Most Current Value

Jun 8, 2006

I am working on a query to select the most current value for a given record
based on dates. The record has an associated cost for a given year say 2000.
For years 2001 to 2006 there is no cost. I want to use the cost in 2000 for
the most current cost even though my date criteria specifies say 2002. Can
this be done within the select query?

Thanks

Tony

View 2 Replies View Related

Current Number

Jun 4, 2007

Hi all,

I looked for a post with something similar with what I want, but i did not found. I need to make a query in access and that query must have a field "current number" that field should return the number of the line.
Let say I have a list of 10 people, the "Curent number" should return for the first line 1 for the second 2 ....for the last line 10.

Does anyoane have any ideea?

plsss help



I.M.

:confused:

View 10 Replies View Related

Sum By Current Month

May 5, 2005

Hello all,

i have a form with 2 fields [edate] and [qty].

what i am trying to do is sum [qyt] by month

i have in the footer for a text box that sums [qty] =sum([qyt])


now i need it to be able to give me the sum of the current month


can someone let me know how to do this

thanks in advance

View 3 Replies View Related

Print Current

Jun 23, 2005

I have a control on a form where a user inputs a number then presses enter. The AfterUpdate event prints a report. The problem is that it prints the previous record each time its updated. I want to print the current record. Maybe some type of requery before the event happens. Any ideas?

View 1 Replies View Related

Need Current User Name

Sep 22, 2005

I need to mine the Proper Name of the current user and automatically populate a field on a form. I've tried default value = currentname() and all I get returned is Admin. How can I retrieve the Proper Name of the network username and auto populate a field? Any help is appreciated.

View 6 Replies View Related

Current Date

Jun 6, 2006

There is a Date Submitted in my form that I would like it automatically poplulated with the current date. How do I do that?

View 1 Replies View Related

Help With Get Current Record On Different Ids...

Jun 26, 2006

I need help to get current record with different ids:
Dim strDocName As String
Dim strWhere As String
strDocName = "16kanaler"
strWhere = "[skjema_16_gr1_ID]=" & Me!skjema_16_gr1_ID
DoCmd.OpenReport strDocName, acViewPreview, , strWhere
How can I use more Ids in the wherecondition? I want to get the current record for skjema_16_gr1_ID and skjema_16_gr2_ID, not only the first.

Please help me...

Håvar

View 2 Replies View Related

Batch File For Current Fe

Jun 13, 2005

Could someone please tell me if this is an appropriate way to ensure that all of my users open the most current version of my database each time?

I am not using workgroup security(not needed), and have the be and fe on the network drive. Right now everyone has their own copy of the fe so everytime I make a change they get a new copy emailed to them. I would like to use a batch file instead. This works but want to make sure that I am doing it correctly if I just send everyone this batch file to put on their desktop (CostSavings.bat)

@echo off

if not exist "C:Program FilesMicrosoft OfficeOFFICEMSACCESS.EXE" goto Access11

"C:Program FilesMicrosoft OfficeOFFICEMSACCESS.EXE" "V:ProjectMaterialsPurchSQECost SavingsCostSavings2005.mdb"
goto end

:Access11
"C:Program FilesMicrosoft OfficeOFFICE11MSACCESS.EXE" "V:ProjectMaterialsPurchSQECost SavingsCostSavings2005.mdb"
goto end

:end
rem pause
cls
exit

Any thoughts/suggestions would be appreciated.

Thanks,

Toni

View 2 Replies View Related

Displaying Current Record

Oct 27, 2005

Hi, I am a complete newbie to Access. I want to be able to double click on the field in the table, form or a query and have, as a result, another form pop-up with all the data from that record displayed. I have tried macros, but the doubleclick property only has things like goto first, last, etc. records. and always brings the first record in the table. Any hep in the right direction is greatly appreciated. Thanks.

View 2 Replies View Related

Lock Current Reccord

Nov 29, 2005

Hi all!
This is my first post here so my appologies if I do something wrong AND my terrible English!! :cool:

I have made a database in Access where I can store all kind of information about hardware (laptop type, s/n, hdd size, memory etc.). Now it sometimes happens that an engineer will loose (!!) his laptop or it wil be stolen...

I want to build an option to mark the current record (of that stolen laptop) as stolen. Just with a checkbox. When i select the checkbox "stolen", all fields in the form of the current record has to be greyed-out. But just only for that record.
Is this possible?

Thanks in advance!

Kindest regards,
Tim

View 14 Replies View Related

Report Of Current Record

Jan 5, 2006

I have got a tricky problem, for which I can find no answer - but then I am a bit of a novice here.

I have created a (probably too-) complicated relational database but what I really need is to be able to make abutton on the page of my address book form, so that when I hit it it creates a report of an address label for that current record on the screen only.

I hope this makes sense. If this is possible, I then need to extrapolate this technique to print a report of a subform (of samples sent) of a current client record.

All help gratefully received

Xenia

View 4 Replies View Related

Pathname For Current Database

Jan 8, 2006

I maintain an Access 97 database system with a number of front ends and two different back ends (for security reasons). The structure is replicated in different directories as there are training, development and back-up copies as well as the live system. I want the menu page to display the name of the front end that is opened and the path and name of the two back ends, referenced from the current database (front end). To do this, I want to read the directory for the current database as opposed to the current directory which may be different. I can't find this in any VBA reference for MS Access 97; although I used to use the equivalent in Excel using the Get function - as I remember it.

Any help?

Gibbo

View 6 Replies View Related

Highlight Current Record

Feb 14, 2006

I have a form with data in formview. When I select a record I want it to highlight with a specific color.

How can I do that?

View 1 Replies View Related

Detecting The Current Year?

Sep 22, 2006

Hello.

Just wondering if there was a way to detect the current year? (2006, obviously). Reason being, have an input date of year a block of trees was planted and i want to have an automatic calculation for the 'age of trees'.

Thanks!

View 4 Replies View Related

Historical Vs Current Data

Mar 6, 2007

Could someone point me in the right direction on how to statically store current pricing for a product in an invoice database, whereby future price changes would not change pricing on past/previously created invoices...?

View 6 Replies View Related

Printing Current Records

Aug 29, 2007

Hi Guys (again),

Hope you can help and I'll explain this as well as I can but I've put it in general as it's a culmination of things.

I have written a call monitoring database for a call centre (all good so far), but they want historical searches (again all good). I've written the relevant queries for these so that the searches can be done for Adviser, Manager and also by a date range. However, they now want to be able to print out the current search from the screen.

The way I have done it is this. I have written the report be adding in a subreport and putting in the relevant historical search form, and then written a macro that is assigned to a button on the historical search form to print the current record.

The problem that I am having is that when they click on the button to give them the history they fill in the relevant advisor or manager name and the date range which gives them the info in form format but, when they click on the button to print the current 'screen' if you like, it asks for the information again. I know this is because the actual report is written from the same query but is there anyway that it will just print what's displayed on the screen? I don't do VBA so if it has to be done that way could you please display it as it should be inserted.

I do hope that that has made sense and that someone can at least help me, cos you're all wonderful and I've had some really excellent help in the past from this site.

Thanks in advance.

Donna x :confused: (as always)

View 1 Replies View Related







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