Over 1 million tech questions and answers.

Solved: Access 20007 Record Display 1st record only

Q: Solved: Access 20007 Record Display 1st record only

I have a form which has a subform called SearchMainSub with displays data from the following:

Me![SearchMainSub].Form.RecordSource = MyRecordSource
'If no records match criteria, display message and move
'focus to Clear button
If Me![SearchMainSub].Form.RecordsetClone.RecordCount = 0 Then
'MsgBox "No Maintenace Records Found", 48, "No Records Found"
'Enable control in detail section

The problem that I am having is that it only displays the first record. I have tired all of the options in the data field for RecordSet Type. It still only displays the first record. Anyone have any ideas? I hope this one is as easy as the other question I asked.

Preferred Solution: Solved: Access 20007 Record Display 1st record only

I recommend downloading and running Reimage. It's a computer repair tool that has been proven to identify and fix many Windows problems with a high level of success.

I've used it in the past to identify and fix everything from blue screens (BSOD's), ActiveX errors, corrupt files and processes, dll/exe/sys errors, recover lost memory, Windows update problems, defragging, malware removal etc.

You can download it direct from this link http://downloadreimage.com/download.php. (This link will automatically start a download of Reimage that you can save to your computer.)

A: Solved: Access 20007 Record Display 1st record only

Read other 6 answers

I want to use the GoToRecord command to go to a specific record in a form. The problem is this uses an offset or record number. How can i find the record number of a specific record?

What i plan to do is use some code similar to this:

docmd.GoToRecord acDataForm, "FrmComputer", acGoTo, expression

where the expression is the record number of the record 'Computer01' for example.

A:Access. Find the record number of a record (For forms and queries)

Read other 13 answers

Hello All,
I have this database I built for all my music CDs. It is searchable by artist, date recorded, venue, city , state, notes and track title. The search works fine but I have one issue. I use a subform for all the track titles and it displays the correct songs for the CD. However, I get a record for each song. So if one CD has 16 songs I get 16 records for that CD. In my sample dB I have 7 CDs but it shows 117 records because that is the sum of all the songs on those 7 CDs. I want it to show only the 7 CD records and not a record for each song and still be searchable. I can make it show the way I want but then I can't search by song title. I attached my condensed database version to look at in case my description seems a bit convoluted. Thanks.

A:ACCESS: Form shows record for each record in subform

Read other 6 answers

How can i capture the record number of a record into a text box on a form?

When i talk about record number i mean the number that appears on the navigation buttons toolbar when in form view.

Thanks 4 the help.

A:MS Access: Captureing the Record number of a record.

Hello agian, try thei in the form's on Current event procedure to see the result -

MsgBox Me.CurrentRecord

to put it in a text box use

me.fieldname = Me.CurrentRecord

where fieldname is the name of your text box

Read other 2 answers


I've created a form in Access-2013 and placed record navigation buttons (using the button wizard) in the footer to allow the user to scroll through the records. They are the usual buttons and function as you would expect:

<< | < | > | >>[/FONT]

Problem is that when a user is on the last record in the table and clicks the ''right" button (in red above), the form displays a blank record. This is normal behavior for Access (as far as I know) and as long as a user enters NO DATA in ANY field, Access does not write the record to the table.

Given that users may be less than astute , I would like to eliminate the possibility of them creating a "blank" record in the table.

Is there anyway to stop this default behavior in Access?


A:Solved: Stopping a form from going past the last record when using record navigation

Read other 10 answers

I have a main form that I have a combo box on that list all the data for that field. The combo box also is setup to allow you to type in the field. How do I display an error msgbox when the user types in the information and a corresponding record is not in the database. Here is my code.
Private Sub Combo31_AfterUpdate()
Dim rs As Object, SQL As String, fstring As String
SQL = "SELECT [Path id].* " & _
"FROM [Path id] " & _
"WHERE [Service id] = '" & Me.Combo31 & "' "
Set rs = CurrentDb.OpenRecordset(SQL)
fstring = rs.[Site]
Set rs = Nothing
Me.Filter = "[Site] = '" & fstring & "' "
Me.FilterOn = True
'clear out the search field for the next search
Me.Combo31 = Null
Set rs = Nothing
End Sub

A:Access VBA to display msg when record not found

mariaa33, that is quite a complicated way to set a filter.
Unless you have the possibility of more than one record with that Site you might just as well use a "Find Combo".
However if you want to continue using the current method you can add this after Set rs = CurrentDb.OpenRecordset(SQL)

if rs.recordcount =0 then
msgbox "That Site does not exist in the database".
Exit sub
end if

Read other 2 answers

Hi all, I got this code type from one of the helpers in a group. It's a long story as to why I'm doing this so I really don't want to waste time stating it again. The original code works fine; however, I needed to use the same type when allowing users to Search and Edit. Using MS's "next" controls at bottom caused problems, so I created my own buttons to go to next. But, using the code given me...I can't get the form to move to the next record after all needed fields are input. Will someone please help me??? Here's what I have....

Private Sub cmdNextRec_Click()
On Error GoTo Err_cmdNextRec_Click

For Each ctl In Me.Controls

If Me.SEContractType = "Construction" Then
If ctl.Tag = "*" Or ctl.Tag = "***" Or ctl.Tag = "*##*" Then
If ctl = "" Or IsNull(ctl) Then

MsgBox "Data Required for '" & ctl.Name & "' Field."

Cancel = True

Exit Sub
Exit For
End If
End If
End If

If ctl Is Not Null Then
DoCmd.GoToRecord , , acNext
End If

Exit Sub

Resume Exit_cmdNextRec_Click

End Sub

A:Solved: Access 03 - Next Record

Have you tried moving this

If ctl Is Not Null Then DoCmd.GoToRecord , , acNext

to here

For Each ctl In Me.Controls

If ctl Is Not Null Then DoCmd.GoToRecord , , acNext
If Me.SEContractType = "Construction" Then

Read other 1 answers

What audio software can I use to simply record *what I hear* from the computer? Record what comes through the speakers.

A:What audio software can I use to simply record *what I hear* from the computer? Record what comes through the speakers.

Audacity should do what you want.

Read other 3 answers

I have a table which consists of date, time, odometer reading as fields. i want to calculate mileage of my vehicle by having query in Microsoft access 2007 which subtracts odometer reading from previous record with current record. can i get the mileage between the customized date and time?

this should take care if the odometer is reset and starts a fresh readings. should have the provision to enter manually the fuel quantity whenever odometer is not working properly.
any suggestion to build a query will be appreciated. thanks in advance.

A:How to create a querry to calculate difference between prev record and current record

Read other 10 answers


We have an Access application that holds employees' table. When new employee comes, the email stating the name of a new employee and the link to this Access app. being sent to a supervisor. When supervisor starts the app, it opens the list of all new employees for a supervisor to choose from.
What my boss wants is, that access will open a new employee record by itself, depending on the name from the email. In other words, he wants to open the specific record by the link from email.

Is it possible to do this?


A:Solved: Access 2003 - Opening specific record in Access table via link in Outlook

Read other 16 answers

I am using the Student & classes template to record student grades.
I am trying to figure out how to print a report card per student. As yet all i can do is print a list of all teh students grades & classes all together. Is there a way to print a report that is baseed on a particular record i.e. the student ID.
Thanks in advance

A:(Solved) MS Access Report/per record?

Read other 12 answers


I would like to have a button which would clear the info in a displayed form. Trouble is i dont want to delete the rest of the data in the record...

I have a form with 5 page tabs. Each tabs displays different info for the same record. E.g. (Incident Details, Action/Results, First Aid, Emergency Services, Banning) The tab banning is info which will need to be deleted when the expiry date is up. It's easy enough for me to go through each field and delete personal data of the banned person, but i would like a button that coud select all, and delete (Clear) I can make it delete, but that deletes the whole record. These records are incidents, which need to remain for referrance other legal purposes.

Any suggestions...or fix

Thanks in advance

A:Solved: Access - How to clear part of a record

Read other 8 answers

In an Access Query, is there a way of obtaing data from the previous record, eg to obtain the date from the previous record to calculate no of days since the last record.

NOTE I dont want to bother with code, if thats the only way I will do without

This is obviously extremely easy in a spreadsheet

A:Solved: MS Access data from previous record

Have a look at this Database which shows how to do Difference between records and to add records.

Read other 2 answers

Here is the situation,
I am a novice, no the less I have been given this position, I must cut a record from a form that has drop down lists, take that data and paste it into a past employee table. When I do this I get the data that was displayed in the look up tables not code. Please any help or step by step is much appreciated.

A:Solved: Access 2010 Cut record in form

Read other 13 answers

Hi to All!

Is there a code that will give me the record number and total number of records in a form?

I want to create a control that shows the record # of the total records. I don't want to use the controls Access provides at the bottom of the form.

Thanks to All who can help!

Read other answers

A beginner needs helps ASAP. I have DB with 5 tables all setup with relationships and forms created but each record does not link information - help.


A:Solved: access DB information not linking to each record

Read other 6 answers

I have a hire/return form/subform. The form is frmHire, the subform is frmHireSub.
Multiple items can be hired under the same HireID, and I can also return ALL items at once.

But, different items have different hire periods (over night and weekly) so not all items are due back at once.

To be able to see what items are currently on hire, when "Hire" is clicked the records are appended to another table "tblOnHire" and when all items are returned they are deleted from "tblOnHire".

All hire details are retained permanently in tblHire and tblHireDetails. tblHireDetails lists each seperate item that's been hired out and has a yes/no field titled "Returned". There is a yes/no field on frmHireSub which uses the "Returned" field as it's control source.

I tried using a query to delete the record(s) that had "Return" checked on both frmHireSub and tblHireDetails from tblOnHire but neither worked, they returned an error asking for the table to delete from.

How do I delete record(s) from one table, based on check boxes on a form that are based on a table?

A:Solved: Access 2010 - Delete Record If

Read other 8 answers

Hi All,

Will try and explain this as easy and as clear as I can.

Each Client has their own record and within each client they have various properties

Recently we have noticed that when we click to go to the next record it doesnt move it wants you to click x times (depends on how many properties) the client has


Joe Blogs - 1 Property
Billy - 2 Properties to move to the next client we have to click twice

and so on.

Any ideas?


A:Solved: Access 2007 Record Problem

Can you upload zipped sample, with sensitive data removed leaving only a few records so we can see what is happening.

Read other 2 answers

I have a data base which tracks files/records in and out, it had been working fine until last Friday Jan 13 (Figures right)

Any way when I opened the data base it was fine. I open my main form to enter a file request and got

Microsoft Access has stopped working

Windows can try to recover your information and restart the program

-> restart The program

Nothing. When I went to the database location on the network there were several files that shouldn't have been there. Copies of the Data Base itself and a file named Records.laccdb I have had no luck getting this data base back to working.

I put the data base on on a memory stick and took it home figuring to work on it over the weekend.

Low and behold it worked fine directly from the memory stick. So what gives I figured.

Got to work yesterday. I moved the data base out of the location and copied from the flash drive. No go. Still dies.

Tried coping the database to a folder on Drive C: thinking it is a network issue. Still fails.

But it runs fine from the thumb drive.

Anyone have any clue how I can get this thing back to working.

A:Solved: ACCESS 2012 Record Locking

Read other 8 answers


Is it possible in Tabular Layout Form to control field in each record separately using VBA?
For example, is it possible to change Back Color of field A only in the records where number in field A is higher then 10?


A:Solved: Access Tabular layout. Record control

You can use conditional formatting Open your form in design view go to the text box etc you want to format right click and select conditional formatting . Make your Condition FieldValueIs, then your value( select from list and then go to fill button and select your colour

Read other 2 answers

I have a db that has 5 tables each linked cascaded (SW <-SWCD <- DGRP <- EQT <-DATA). The Main form SW (single view) has a subform for each table (dataview) but they are linked to the previous subform like above (not main form except SWCD). I am trying to figure out the best way to search on the EQPT field (from the EQPT table/subform) and display the correct results in the Main form with the subforms. Can any one help?

A:Solved: Access Find Record on Subform Field

Read other 8 answers


Using Office 2002 (I know, but it usually does what we want it too ).

We have an Access DB including 2 forms that display data taken from 1 table (one form displays the general info, the other the account details).

I have placed a button on each form that opens the other form then closes the first form. What I am wanting it to do is open the other form at the record that was displayed on the 1st form. I don't want it to filter so you can only view the current record (example: from Form1: Record1: click the button and it will take us to Form2: Record1: but once we are finished in there we can search for other records whilst in Form2: then click to go back to Form1: displaying the last record viewed in Form2

I did a google and got a few suggestions but none seemed to work, so I am now back at the "open the other form" code.
Private Sub OpenAccounts_Click()
On Error GoTo Err_OpenAccounts_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "BCAccounts"

DoCmd.OpenForm stDocName, , , stLinkCriteria

DoCmd.Close acForm, "Data"

Exit Sub

MsgBox Err.Description
Resume Exit_OpenAccounts_Click

End Sub
Any suggestions?

Slimboy Fat

A:Solved: Access - Open Another Form at Current Record

Read other 7 answers


I have a Subform embedded in the Main Form.
Main Form has a print button.
By pressing the button I want to print current record from the Subform only.

The code I use in the Subform is (main part only):
Public sub PrintSingleRec
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.PrintOut acSelection
End Sub

The button in the Main Form is calling this function to print the record.
What I get is - all records are being printed out, from the Main Form and from the Subform.


A:Solved: Access 2003 VBA - Cannot print single record

Read other 6 answers

When I have a record pulled up on a form I want to have a subtable/form of additional information that is unique to that record. I want to put a button on the first form to open "frmContactInfo" I can't seem to get it to work right. I have a relationship of "tblContactInfo" to "tblProjects" so that the tables are linked. I can get it to work put when I go to a different record and click the button again it pulls up the wrong data.

How can I get it to only pull up the data asscoiated with the first record? It is probably simple but I'm just not getting it.

Thanks, Joe

A:Solved: Add subtable to existing form record-Access

Read other 6 answers


Just to explain what I am wanting to do.
A client sends us a text email that includes the info needed to create or even update several records at once. We already have the routine that creates the records. It also ticks a Yes / No field called "ActionNeeded".

What I need is a button which when pressed will go to the next record where ActionNeeded = Yes.

Slimboy FAt

A:Solved: Access: Find Next Record Matching Criteria

Read other 16 answers

Hi All,
I have a combo box on a form header that I'd like to set up so the user can select a specific record to be displayed in the form. I have successfully set these up in the past, but recently I added a sub form that required me to change the Record Source of the form so it uses two tables, not one. Since then I noticed my Combo box no longer works. I've searched the internet for specifics on who to fix this but come up short! Any help would be immensely appreciated - I'm so close to finishing the project that I can spit on the finish line!
Here are the deets:
Main form is called: 'Update Employee Profile' --> Data accessed by this form is stored on table 'Employee Information' --> Primary Key is 'Crew ID'
Subform is called 'Company Issue Equipment' --> Data accessed by this form is stored on table 'Company Issue Equipment' --> Primary Key is 'Electronic Equipment ID' (one to one relationship to 'Crew ID')
Currently the record Source on the main form is:
SELECT [Employee Information].*, [Company Issue Equipment].*
FROM [Employee Information] INNER JOIN [Company Issue Equipment] ON [Employee Information].[Crew ID] = [Company Issue Equipment].[Electronic Equipment ID];
I'd like the combo box list to show the following headings: Last Name, First Name, Classification - all found on the 'Employee Information Table' . I currently have a query set up with ... Read more

A:Solved: ms access select record with combo box not working!

Read other 10 answers

I'm running access 2k, WinXP Pro SP2 - both are current with latest updates. I'm having a problem getting the select query behind a report to give me the results I need. The query works with two tables (clientlist and payments). Payments is related to clientlist on a one-many relationship, using ClientList_ID primary key.
The payments table structure is as follows:
The ClientList table has fields like 'lname', 'fname', 'dob', etc, etc.

Im trying to structure a query that will list each client, and ONLY the last payment they made. I tried using a select query Top n, making 'n' value 1, and it only lists one client, one payment record, which isnt even the last payment they made.
This is the query that I currently have....

SELECT TOP 1 [Client List].ID, [Client List].Lname, [Client List].Fname, Atty_Pmt.Atty_PmtID, Atty_Pmt.Date, Atty_Pmt.PayAmt, Atty_Pmt.PayNotes
FROM [Client List] INNER JOIN Atty_Pmt ON [Client List].ID = Atty_Pmt.ClientList_ID;

Can someone tell me how to single out the most recent payment (either by greatest date - maybe closest date to current date - or by the 'Atty_PmtID' field). It could possibly be based on the 'Atty_PmtID' field because the payments are entered in order as they come in, so the most recent payment would be the higher 'Atty_PmtID' autonumber, but I just dont know.
Thanks in ... Read more

A:Solved: Access 2k query problem (print last record ?)

Read other 13 answers

I'm a newbie to Access 2007, have done programming prior to retiring. Everything I read suggests that Access is EZ for data entry. but I must be doing something wrong. Have the relationships of 3 tables established, query works fine, form pulls up data that I manually input into the 3 tables, BUT I can't figure out how to add a new record using the form.

I've build various forms using only one table, multiple tables, query based on 1 table, query based on 2 tables, query based on 3 tables. All the queries work pulling up existing data. I've build forms one each of these queries as well as using the tables directly, but all the forms show me all the records in the database, but don't allow me to enter a new record. Any suggestions?

Thought this was going to be ez, but have spent hours and hours working on building a data entry form with zero to show for my effort. Any suggestions???

Tech Support Guy System Info Utility version
OS Version: Microsoft Windows 7 Home Premium , Service Pack 1, 64 bit
Processor: AMD Phenom(tm) II X4 840 Processor, AMD64 Family 16 Model 5 Stepping 3
Processor Count: 4
RAM: 3839 Mb
Graphics Card: ATI Radeon HD 4250, 256 Mb
Hard Drives: C: Total - 715301 MB, Free - 689565 MB;
Motherboard: ASUSTeK Computer INC., M4A88TD-M/USB3, Rev X.0x, MF70B1G05300297
Antivirus: None
Also use System Mechanic Pro

A:Solved: Unable to add NEW record in Access 2007 Form

Read other 6 answers

Hello Guys,

I have a form called "FrmClientSupportOverview" Which is the a list of all support calls. I have a button at the top of the list to add a new record i.e...new support call. The Form it opens is "FrmClientSupportNew" this form sits on top "FrmClientSupportOverview", and when i have filled in the new entry, i want it to close "FrmClientSupportNew" and update "FrmClientSupportOverview" with out manually refreshing, or closing and opening the the form "CleintSupportOverview"

There must be a simple code to do this? and if so...where would i put it? Pretty please


A:Solved: Access VBA Adding New record to Main List

Read other 6 answers

I have an Access database that includes 3 related tables. A form is used for data entry that displays all 3 tables (using two subforms).

I have a report that runs from this form at the click of a button. This prints all displayed data. However, if either of the 2 subforms do not have an entry the report comes up blank?! Is there a way to get the subforms to create a matching blank record when the main table is added to? Please help?!

NB. The offending Database is attached and is zipped with ZipCentral

A:Solved: Access, help?! Insert record into related table

Read other 16 answers

I have a database that was built in Access 2003. I am now working on Access 2007.

When I open a report in design mode, chnage the record source query, and save the report. The changes to not take. When I open the report back up, the record source information converted back to the original information.

Can anyone tell me why this is happening?

A:Solved: Access 2007 Record Source Not Keeping Changes

Have you checked the MS website for problems running Access 2003 & 2007.
Do you still have Access 2003 installed?

Have you tried changing the report using "Save As" with a different name?

Read other 2 answers

ASP using an access db. I have create a recordset that will return a single record and I'm trying to retrieve that record. When I try to get the record it won't retrieve that value. This is only happening when it is one record in the recordset. The recordset is not at BOF or EOF. Do anyone have any solutions or other alternatives. Need help ASAP, I have been working on this for several days. Below is the code:

Set rsHotFix2 = Server.CreateObject("ADODB.Recordset")
rsHotFix2.ActiveConnection = MM_AMT_DTS_STRING
rsHotFix2.Source = "SELECT Max([CID]) AS LastCID, SID FROM TCO_Contractors Group By LastCID, SID HAVING (TCO_Contractors.SID= "&rsHirerachy__MMColParam&")"
rsHotFix2.CursorType = 0
rsHotFix2.CursorLocation = 2
rsHotFix2.LockType = 1

if rsHotFix2.bof and rsHotFix2.eof then

response.write "Recordset Is Empty"
response.write "Recordset Is Not Empty"
response.write rsHotFix2.Fields(0) & "<BR>"
response.write rsHotFix2.Fields("LastCID") & "<BR>"
response.write rsHotFix2.Fields.Item("LastCID") & "<BR>"
response.write rsHotFix2("LastCID") & "<BR>"
end if
This is what's display on the page
Recordset Is Not Empty

Notice it does display the CID value.

A:ASP - Cannot Retrieve record from a 'single - record' recordset

Read other 8 answers

Hello, I am fairly new to Access 2007.

I have a form where I have created a combo box which has a record source of all Titles from a table of resources. When I created the combo box, I selected the "Find a record on my form based on the value I select..." option.

The problem: I have about 10 titles, when I select 1,3,4,6,7,8,9,10 records, they show up on the form. When I click on the second or 5th record, nothing happens. Any ideas as to what that may be?


A:Solved: Access 2007 - Find a record from a combo box selection

Read other 6 answers

I've searched the forum and can't find the help I need...perhaps I'm not using the right keywords.

Anyway, I want to automatically have a time stamp entered in a field named "CancelDate" if a yes/no field named "Cancel?" is checked. On the form I use an action button for that field.

I'm new with VBA, but after some research I entered this code in the AfterUpdate line in Properties:

Private Sub CancelDate_AfterUpdate()
If Me.txtCancel?.value = 1 Then Me.txtCancelDate = Now()
End If
End Sub

...and it doesn't work. It seems to hang up because of the question mark. I get a Compile Error: Expected:Then or GoTo.

Can anyone help me?

A:Solved: Access 2007 Record Date When Field Updated

Read other 10 answers

Hi All,
I created a form that uses data from multiple tables. Recently I changed the placement of some of the data - I moved onto a new table. It resulted in my form going blank. I have spent the last few hours scouring the internet and found a few bugs, however my form is still malfunctioning!
Here's a description of what is what:
I first discovered that the form goes blank when some of the references aren't correct. (Makes sense since I changed the location of some information right?). The references where in a query accessed in the Form's 'Record Source' property. I managed to correct (I think) those, but it still didn't fix the problem.
I am an intermediate user at best so I'm not aware how the 'Query' came into play because I used the wizard to create the basic form and started adding to it. I've tried adjusting a few things and am too far to go back now!
Here's the exact situation as it stands right now:
1. My form is still blank.
2. I have a feeling since I messed around with the Record Source property that it just needs to be re-written because in the Design view, I can see errors on some of the content. The error that comes up refers to "Invalid Control Property" or " No such field in the field list".
3. My form is called New Employee Entry and my tables are Contact, Employee, Personal and Travel.
I hope that's enough to get some advice - I'd hate to have to start ... Read more

A:Solved: Access 2007 Record Source - Form gone blank

Read other 10 answers

Can someone help me with this query? I am trying to pull the record with the most recent date. I'm clearly not grasping the concept somehow; what am I doing wrong here? Created an overly simple example, attached.

A:Solved: Access Query Pulling Record with Most Recent Date

You should not have the FundID and the Nav in the query because their "Grouping" stops the Max from working.
Unless of course you want the max date for each fund.
You should have just the EffDate and then create a query based on that query and the table joined by the date to bring in the other data.

Read other 3 answers

I posted a while ago about an Access database I was working on to help better organize our IT department. Long story short, it's pretty good for the time being, but there are a few things I'm still trying to work out to make data entry easier.

In particular, I have a new order form that adds records for each line item in a purchase order. At times, I have multiple items that are going to the same location with the same order number, order total, order date, user assigned, business unit charged, etc.

It would be extremely easy to fill out the form at the beginning of one of these orders and simply click a "Copy Current Record" button which would duplicate the record to a new one where I could then modify the few things that I'm required to (e.g., Product ID).

I've already got an "Add New Record" button that we can use to start with a new record built from some out-of-the-box functions in Access.

Any ideas for an easy "copy current record to new record" button I can add to help speed things up?

A:Solved: Access 2010: Button to Copy Current Record

On the New Button Wizard select "Record"> Duplicate.

Read other 1 answers

I am trying to delay records being shown on my access database form for 30 minutes from when the data is entered.

My database is populated by emails coming in, and some need to be left for 30 minutes before they need to be dealt with.

I was hoping to be able to put a DateDiff function in the filter when opening the form so that those wouldn't be displayed, but I can't seem to get it to work.

My DateDiff function looks like this:
DateDiff("n", Received, Now())

I think this should give me the number of minutes difference between when the email was received and the time now. I could then put > 30 to make it only display those that are more than 30 minutes old.

I think the problem might be the double quotes, but am not sure.

Any help to my thoughts, or a completly different solution to mine is welcome.


A:Solved: Delay showing record on Access form for 30 minutes

Read other 6 answers

I've made a button on a form which, when pressed, adds 1 to one field and adds 7 to another.

The problem I am having is selecting which record this applies to.

I am wanting for the button to apply to the record on display in the form.

I've been able to get the number of the current record into a variable lngrecordnum but am unsure how I can use this to select the record I want to edit

Any help is much appreciated. My code is below:

Sub CallMade()
Dim dbs As DAO.Database
Dim rstQuotes As DAO.Recordset
Dim lngrecordnum As Long
Set dbs = CurrentDb
Set rstCustomerQuotes = dbs.OpenRecordset("Quotes Table")

lngrecordnum = Forms![Quotes Table Form].CurrentRecord

'Select which record here

rstQuotes!Call_attempt = rstQuotes!Call_attempt + 1
rstQuotes!Priority = rstQuotes!Priority + 7
End Sub

A:Solved: Access edit data of currently open record in a form

Read other 8 answers

Hi friends

I find it annoying that my continuous form HAS to show the empty blank record at the bottom.
I have deliberately disabled Navigation and Record Selectors

I DO need to add new records (cmdButtonAddNewRec), but I don't want to see an empty one UNTIL I press cmdButtonAddNewRec.

Is this a behaviour I can manage through VBA?


A:Solved: Access 2003: Hide blank new record on form

Chris, yes you need VBA. Set the Form's Property "Allow Additions" to "No" that will remove the new record.
If when you press your Command button it doesn't take you to a new record set the Form's property back to yes in your VBA with
me.allowadditions = true

Read other 2 answers


I need to update one field in the most recent record in my table; the new value for the field needs to come from prompting the user. I've been able to update the field to a hard-coded value using the following SQL in an update query. I just can't figure out how to prompt the user for the value instead of using the hard-coded value of 2. The Urgency field is of type Integer, and the Id field is of type AutoNumber. Thanx in advance for your help.

SET Urgency = 2
(SELECT MAX(Id) FROM tableA));

A:Solved: MS Access 2003, Update One Field in Most Recent Record

You can use a form for the user to enter the Urgency value, preferably using a Combo Box to select from a list of possible values.
You can also use an InputBox function but it is not as versatile as a Form.

Read other 2 answers

Okay forgive me as I NEVER want to touch databases. My wife only does little things in DB's and god bless her made a wonderful DB for us to keep track of our email accounts.

The problem is 1 button she made actually prints out ALL records to the printer instead of the one showing on the screen. THis is as far as her knowledge gets her.

Now when I look at the button in the form the name is - cmdEmailLogPrintForm

and when I look at the vb I see that it has -

Private Sub cmdEmailLogPrintForm_Click()
On Error GoTo Err_cmdEmailLogPrintForm_Click

Exit Sub

MsgBox Err.Description
Resume Exit_cmdEmailLogPrintForm_Click

End Sub

Now I am fairly good at decyphering things and it seems to me the problem is with DoCmd.PrintOut

Is there any way to get this so it only prints what is currently showing in the form window NOT everything in the DB?

I have already cleaned the few other snafus I have with the DB but this one is not as minor as the others were (the others were just view layouts).

A:Solved: Access - Form button prints entire DB not the single record I want.

You are correct the DoCmd.PrintOut is not the correct way to print the current record.
The best method is to either save the form as a report or create a report with the same fields.
The report's data source should be a query that uses the current form record as it's criteria.
It is usual to use the form's current record's key field to "filter" the query.
This means putting in the criteria row of the query

Forms![Form Name]![key Field Name]

where form name and key field name are those used on your form.

Read other 3 answers

Hello again! I'm continuing to have problems with a form I created in Access 2007. I have a master form with 2 sync'd combo boxes. The 2nd combo box is supposed to display results from a query into a continuous form (sub form). The problem I am having now is that the continuous form is only displaying a single record, even though there should be several resulting from the query.
Another - possibly related problem - is with the combo boxes. When you open the form, the first box (cboRegion) is empty but the 2nd (cboLocation) still shows the last city name chosen. The continuous form also shows the results of the last search, but still only one record.
Any thoughts are appreciated!

A:Solved: Access 2007 - Continuous form only shows single record

Read other 16 answers

Can anyone suggest how I can keep a comment record from being created if the “Comment” text box is blank or only has blank spaces in the text box?

Is there a VB script or something??

A:Solved: Keeping a Comment with only blank spaces from creating a record in MS Access

jlathem said:

Can anyone suggest how I can keep a comment record from being created if the “Comment” text box is blank or only has blank spaces in the text box?

Is there a VB script or something??Click to expand...

Note: Access uses VBA, not VB script, internally

In the form's Before Update event use something like this:
Private Sub Form_BeforeUpdate(Cancel As Integer)

Cancel = False
' perform data validation
If Len(Trim(Nz(Me.txtComment,""))) < 1 Then

MsgBox "You must enter a comment.", vbCritical, "Data entry error..."

Cancel = True
End If
If Not Cancel Then
' passed the validation process

If Me.NewRecord Then
If MsgBox("Data will be saved, Are you Sure?", vbYesNo, "Confirm") = vbNo Then
Cancel = True
' run code for new record before saving

End If

If MsgBox("Data will be modified, Are you Sure?", vbYesNo, "Confirm") = vbNo Then
Cancel = True
' run code before an existing record is saved
' example: update date last modified

End If
End If

End If
' if the save has been canceled or did not pass the validation , then ask to Undo changes
If Cancel Then

If MsgBox("Do you want to undo all changes?", vbYesNo, "Confirm") = vbYes Then

End If

End If... Read more

Read other 1 answers

Desperate for some help here so let me try explain this better:

I have created a simple database using access. I have little knowledge of VB or SQL so have created the database using the WYSIWYG features incorporated in the programme.

Basically I have three tables called family, students and grades. [Family] is my primary table. [Students] is a linked table holding the information of individual students of each family. I then created an input form using [Family] and inbedding [students]. At this point everything works superbly. I can create a family record and then link specifc students to this family. From here I have created querries to filter the information according to my needs. Using the querries as a basis I have then developed reports which print the required info I need in the required layout.

Now I would like to create a new section using the same structure as above for new enrolments. These tables will have many of the same fields as the above. By linking the tables I can automatically replecate the information, however I only want to do this for specific records. In other words, only when the new enrolled family is finalised must a new family and student record be created.

Basically,by linking tables, this happens automatically. I want to bypass this and create a macro (I think) which will create a record on request only.

I hope I have explained this correctly.


A:Solved: Access 2003 - update record to linked table on demand

Read other 12 answers

Hi! I'm new to the forum, and not as knowledgable about Access 2007 as I thought I was when I started this project, so please bear with me as I trip over words and concepts!

I have a master form set up with synch'd combo boxes. The 2nd combo box displays results in a continuous form - showing a shortened version (query'd) of the matching records.

I need to be able to select a record in the continuous form and view +/ print the chosen record from the main table.

I created a report to display the record.
I created a command button to open/view the report but it opens to the 1st record in the entire database instead of the record selected in the continuous form.

How do I get the command button to open up the full record indicated by choosing the shortened version in the continuous form?

Hope this makes sense. Any suggestions / thoughts are welcome! Thanks in advance.

A:Solved: Access 2007 - Print single record selected on continuous form

MuddyTurtle, welcome to the Forum.
Your question makes complete sense, the easiest way to achieve what you want to create a Query for your report.
In the Key field enter this in the First Criteria Row.
forms![Formname]![Subformname]![Key Field Name]
where Formname is the name of your mainform, Subformname is the name of the subform as the mainform sees it and
Key Field Name is the name of the key field on the subform that identifies the Record that you are on.

Read other 2 answers