Over 1 million tech questions and answers.

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

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

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.

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

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: Access. Find the record number of a record (For forms and queries)

Read other 13 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

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

Hi everyone.

Just wondering if someone can give me a hand. I simple used the wizard to generate a tabular form that gets the data out of a query in Access. I simply would like to click anywhere in the form and then select that record I clicked on.

Once selected the record, how can I get that record's ID so then I can run a SQL statement to delete it.

Any help would be appreciated.


A:Access 2003 Tabular Forms - Record selection

negvillamizar, welcome to the forum.
I normally get quicker responses if you post your Access questions on the Business Applications Forum.

As to your question, I am not quite sure why you need the Record's ID to run an SQL statement, having clicked on it, you can just press the delete key and it will delete the record for you.

Read other 1 answers

Hi, this probably something simple, but I just don't know it.
I have two forms, the first called directory, the seconde called details.
I want a button on directory that will pull up the detail form of the specific record.

Now in earlier versions of Access I used the command button wizard to run Form Operations - Open form - [Form name] - [Open for specific data] - selected the matching fields. And that worked like a charm.

Since I've upgraded to 2007 though, it always, and I do mean always, opens the proper form, but selects the last record in the form.

I've read elsewhere where this is 'new' feature of 2007, but this doesn't serve my purposes.

Any suggestions as how to fix this would be greatly appreciated.

A:Access 2007 - searching for specific record in two forms

If you use the standard VBA created by a Command Button to go to a specific Record does it work?
Especially if it was created in Access 200-2003?

Read other 3 answers

I have a single Access 2007 table with too many fields to display on a single form page. How do I add additional forms and have the forms update and see the same record?

A:Using multiple forms to update a single record in Access 2007

TLE, welcome to the Forum.
I would use a Tabbed Form, the Tabs all use the same Table or Query.

Read other 3 answers

Hello Everyone:

I am having a little problem with my Access database. I have a master form with a subform in it, there are two sets of record numbers, one for the entries in the subform and another for the master forms. The subform record number behaves fine but the master form record number is a bit malfunctioning; it doesn't count the total number of master forms, instead it counts the total number of subform entries in all master forms.

For example: if I have 3 master forms, with 3, 2 and 1 subform entries in them, respectively, then I want the record number for the master forms to show that there are 3 records total. Currently, however, the master form record number would show that there are 6 records total. When I click on "next record', the same master form is still displayed until I get to record 3 of 6, then when I click "next record" it goes to the next master form.

Any insight would be appreciated, if my wording is confusing please let me know, I will try to clarify and upload screenshots if necessary. Thanks in advance.

A:Access 2007 record number.

Record numbers should be based on a primary key not some arbitrary number based on how many sub forms are showing. It sounds like you really need to redesign your tables and forms or you will have even bigger troubles down the line.

Read other 2 answers

I am using Access 2010. I have a main form and a subform. I select a record in the mailform (via ComboBox) and see the corresponding records in the subform (master-details style).

I would like to duplicate the "record number box" on the bottom of the form by displaying the "nn of mm" records in a TextBox. I cab find the current record, but how do i find the number of records in the recordset.

I havve used the command "F_rcTB = Me.Form.CurrentRecord & " of " & Me.Form.Recordset.RecordCount" on the "current" event of the subform. The command works great, once i go to the second record or anywhere after that, but it will not display the corrrect counts on selecting the "master" selection criteria.

If i use the debugger, then the correct numbers show up.
What am i doing wrong or is there a better method of retrieving the data?

I dont see the "RecordCoun" property explaind in the help files for Access 2010. Does it still exsist?

Read other 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

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.

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

Read other 6 answers


I have set up a combobox in my Access 2013 database to find a record and display in the rest of the text boxes on the form. I set it up with the wizard and it works when I go into it directly from the navigation pane, but when I go to it from my menu (via a macro), it doesn't display the info in the other text boxes.

This is the linking macro:

Form Name Cheques Presented
View Form
Filter Name
Where Condition =1=0
Data Mode
Window Mode Dialog
Control Name

And this is the macro for the combobox:
Object Type
Object Name
Record First
Where condition =="[ID] = " & Str(Nz([Screen].[ActiveControl],0))
Any ideas?

A:Access find a record not working

bigdawglj,welcome to the Forum.
It sounds like the Open Form Macro is not opening the form with the right info for the Combo to use.
If you manually open the Form from the list of forms does the Combo work?

Read other 4 answers

Hey there, if i use the find button from the toolbar it works, but the docmd FinRcord button i created in the main form dont work.

I want to do this:

1). put something in the searchbox the click the search button, if found something go to the record if not do nothing and focus the sarchbox

2) Its there a way to make the navigationbar alittle bigger?

I inclueded the .mb if you wanna checkit. Thanks.

A:Find The Record from a searchTextbox in Access


Read other 2 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

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

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 am using DoCmd.TransferSpreadsheet to export results of a query into Excel. What I am trying to do is add a blank record after the last exported record and export results of a second query after the blank line.

Does anyone know of a VB command to add a blank record to the exported file and then export a second query directly after the blank record?


A:Adding a blank record between exported queries in Excel.

Just try and run the second query and output to the same file name. It should create another worksheet in the same file. I know this probably isn't what you are looking for.

Read other 2 answers

In designing in Access, you can easily add a button to go from one form to another and stay in the same record by telling it to match the (for example) ID number. I want to create a macro that does that and then closes the form that I just left so I only have one form open at a time. Can someone tell me the steps to have a macro do that. I don't know how to program in VB, but I can create macros using the Access program. Here is what I have....
1) It asks for Form Name (I get that part)
2) It asks for what view (I get that part)
3) Filter name (I don't think I need that line filled in)
4) Where Condition ( I am guessing I could use this to say open with the same ID that I have open now)
5) Data Mode ( I am guessing I want to be in "Edit" mode)
6) Window Mode (it defaults to "Normal" I am guessing this is OK)

Can anyone tell me with I need in steps 3 or 4 to open the form with the same record I am currently in?

A:Open and Close forms for a record

Read other 10 answers

Hi there, i wounder if you are able to help. I have an Access database that is used to search for candidates in a database using certain criteria. The criteria are displayed via list boxes etc and the user has the ability to select which criteria they want, and then search. The search returns the names of the relevant candidates on another form (Results Form).

On the results form i have created it so that at the side of everyones name appears a command button. once pressed this goes to to Candidates details form which displays that relevant candidate.

The issue i have is that when i select this command, the form appears blank. I have noticed though that whenever i turn off the filter and then select it again it displays the correct record instead of being blank. Any ideas? Thanks for your time and efforts in advance.

My code for the command button is;

Option Compare Database
Private Sub Command6_Click()
On Error GoTo Err_Command6_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmCandidatesDetails"

stLinkCriteria = "[Candidates ID]=" & Me![Candidates ID]
DoCmd.OpenForm stDocName, acNormal, , stLinkCriteria
Exit Sub
MsgBox Err.Description
Resume Exit_Command6_Click

End Sub

A:Solved: Filter a forms record not working correctly

The Openform command is looking for the form called "frmCandidatesDetails"

stDocName = "frmCandidatesDetails"

Is the form populated to link to the master form?

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

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

Hello.After upgrading my PC to Windows 10 i cannot open MS Access .mdb extension database.The error message: Bad record numberSo i uninstalled it and reinstalled Office and same thing. What's wrong? Is there a way to open my database?

A:Bad record number

Thank you for your message.Are you trying to access files created in a previous version of Access?Have you completed all Windows updates?What is the version of office suite installed?For my records, please click on my Dell username & send a private message with the service tag, registered name & email address.

Read other 1 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

Rog: You should love this one.


A:Record Number of Viruses??

Read other 6 answers

I have been through tons of sites looking for solutions for my problem, being
unable to find any; I have decided to post one myself.
I am currently working on one end of a project. I have a form based on a
table. This form has two text boxes for entering the start and end date, 2
combo boxes for selecting the shift, and 3 buttons for performing functions
with the data entered. The user clicks a button when they are done making
their entries/selections on the form. Each button is related to a report
that is based on a query. The query takes the start and end dates entered
(and any date in between), and the letters in the combo box (shifts) to
create a report that shows all data gathered for the specific dates and the
shifts requested.
My problem is that I have 3 Shifts. I have not found away to be able to use
3 combo boxes to make the selections because the query criteria, Is Not Null
And Between [forms]![frmLHLSVSR-DD]![combo1] And [forms]![frmLHLSVSR-DD]!
[combo2], will not let me use 3 combo boxes (or does not seem to want to).
From the reading that I have done I will need to include an All Option in my
combo box so that the User can print the data from all of the shifts. I can
do this and get the All to show up in the combo box, but the report comes out
In the end I want the user to be able to specify their dates on the form,
pick the shifts they want to show the data for (currently they can use A D,
or A, M etc, but they can not do A,D,M which is the goal) and ha... Read more

A:Access, Forms, Queries, Reports

Read other 16 answers

MS Office 2007. Access. For business applications, routinely import Excel files into Access using import wizard, and have had no problem - until today. Suddenly, when attempting to import using the wizard, after assigning a table name as the last step of the import wizard sequence and click on "Finish", I get an error message: "Cannot find search key for any record"; after clicking the OK button, second message saying that none of the records have been imported.

I cannot find anything in on-line help related to "search key" for Access. Does anyone have experience with this? Since this has always worked before, is this virus related? Any help much appreciated.

Read other 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

have an issue.

last night when i shut my computer off it kind of restarted by itself. this happened a few nights ago but i didnt think much of it, i just shut it down again.

but last night it shut down, started again but got stuck on the windows screen. this one

that blue bar just kept moving across. after about 5 minutes i switched the power off.

this morning i got that screen about windows not shutting down properly and so tried to boot in safe mode. i came back 5 minutes later and i was on that blue screen (the one you see when you install updates upon shutting down) and it was filled with "file record segment 3631 is unreadable".

there have also been a few lines like "inserting an index entry into index $0 of file [number]" or "deleting an index entry into index $0 of file [number]" as well as "12 percent complete"

its not finishing doing whatever it is doing so i cant do much right now so im just looking for some general help and advice on what to do afterwards. can someone explain whats going on? talk of $0 is worrying me a bit cause this is a register right?

edit: ok, it finished and got stuck on the same loading screen as before (image above) so now i need some active advice on what i should do

Read other answers

Currently got a letter mailing from a large database in Access 2003

In the letter, you have the choice of using criteria to choose certain records depending on search facilities

I have done this and it all prints well - but I would like to insert the ORIGINAL record number from the large database mentioned.

I did try it, but ended up with the record number of the SEARCH CRITERIA starting at 1.....

Any ideas ?

A:Insert record number into Mail Merge

The record number does not correspond to the primary key in general if you are ever deleting records there can be gaps in a sequence. Inserting the primary key would be simple.

Read other 3 answers

I am currently running Access 2007 on an Acer Aspire computer running Windows 7. I also use a recent HP desktop running Windows XP Professional and Access 2007 at work. I am setting up a database that has 830,031 records & 100 + fields in the main data table. Presently, the table has no unique record ID that could be used as a primary key. I want the table to be sorted in a specific (chronological) order, which I can easily do with a simple query. I have added a new empty field called D_Rec_ID, and I want to fill this field with the record number for each record in the sorted order. Once the database is completed, the number of records will not change. How can I populate this field with sequential record numbers? The only thing I can get to work is to set up an Excel spreadsheet with blocks of 8,000 sequential numbers, copy each block of numbers, and paste it into the Access table in the appropriate location. I can only do 8,000 at a time without exceeding the MaxLocksPerFile on my work computer (set at 9,500), which I can’t change. This is an extremely tedious process and prone to mistakes. Any suggestions would be greatly appreciated.

A:Solved: Sequential numbering of records with record number

DigitalDoc4, welcome to the Forum.

I assume this "database" is only going to be used for Searching?

To do what you want Copy the Table and Paste - Structure Only.
Set your new field to Autonumber.
Now create the the Query and sort it in the order that you want.
Convert the query to an Append query and select the new table as the table to be appended to.
Save and Run the query.
The records should now be entered in the new table in the order that you want with new ID numbers in that order.

Read other 2 answers

Microsoft on Tuesday patched a record number of security holes in its Windows operating systems and other software, a haul that included at least one security flaw that was already under attack in the wild.

Microsoft's Patch Tuesday fixes record number of flaws ? The Register

Read other answers


I am a relatively novice user of Access 2007. My knowledge ends when I go beyond using a template. However, I am attempting to create a database from scratch for my job. I have encountered numerous issues, but easily found some solutions.

Unfortunately, my recent problem doesn't seem to have a current forum. I have created a database that contains 7 tables. From that, I created 2 forms, 1 subform, and 1 query. The intent of one of the forms is to allow general users of the database the ability to input data that will populate the fields of all tables, forms, and queries. However, the form is only populating the data into the 7 tables, not the other form or the query.

I hope to create more queries and some reports that will be generated off of the information that users input into the main form. Please help me determine what I need to do to ensure that general users can easily input data.

A:Can you create a form in Access 2007 that inputs data into all tables/queries/forms?

Read other 16 answers

I am making a tool that will take data through a series of steps. I have a master list of data. They say who they are, and click start, and the first step will have their data pasted in. They fill out some more fields, and click next, that data updates the master data with whatever they added or changed. Then we move to the next step, etc. My problem is I can't get the master data updated. I have a "tempdata" sheet I've been using as a midstep. Considering it's 4 am into this now all-nighter, and I have the meeting for this at 10am, I'm really not looking to be pretty behind the scenes. I was trying to adapt this code, but I can't figure out this issue:

Error: Expected Named Parameter
And after the red text, I basically had no clue what I was doing.
Dim Update As Range
Dim upcell As Range
Dim FoundRange As Range
Dim ValueCell1 As Range
Dim ValueCell2 As Range
Dim ValueCell3 As Range
Dim ValueCell4 As Range
Dim ValueCell5 As Range
Dim ValueCell6 As Range
For Each upcell In MasterData.Range("A:A")
If IsEmpty(upcell.Text) Or upcell = "" Then Exit For

[COLOR=Red]Set FoundRange = MasterData.Range("A:A").Find(What:=upcell, _
After:=TempData.Range("A1"), LookIn:=xlValues, LookAt:=xlPart,
SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False)[/COLOR]

If Not (FoundRange Is Nothing) Then
Set ValueCell1 = FoundRange.Offset(0, 4)
Set ValueCell2 = FoundRange.Offset(0, 5)
Set Valu... Read more

A:Find and update Record

Read other 6 answers

Ok i made an Xp bootable CD. I did this 2 times and I followed all the instructions, burned it in nero as CDROM (boot) with all the correct settings. I downloaded the XP boot record (bin file) and I used that as the boot image.

However, when I use this on the computer I am tryikng to install it on, it says "searching for Master boot record on CD.." for about 15 seconds on startup and then just boots from the existing hard drive OS because aparently it can't find the boot record.

The cds work fine on my laptop, if i put it in and run it after my laptop is already started up, the windows xp menu for installationcomes up fine.

never had this happen before so i don't know what the problem is.. i changed the boot priority so it is trying to bootfrom the cd rom, but just cant....


Read other answers

ok so i copied xp files off the disc by setup by booting from cd but it doesnt find the boot record in ide 1 2 3 or 0?
what should i do?

Read other answers

I have created a form in Microsoft Access, but I only have one record and it will not allow me to create new records in the form. Is there any way I can fix this problem without creating a new form? Thanks in advance.

A:New Record in Access

Read other 8 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 have downloaded invoices from ebay but I can't get them in CSV. They come as in the following sample examples, o f which I have about 400 records to organize:

Aug 2 08:38:39 Spanish English Electronic Dictionary Translator: IPA 180143277420 Final Value Fee $1.42
vixu Final price: $34.00 (Fixed Price)

Aug 3 06:50:08 Spanish English Electronic Dictionary Translator: IPA 180143277420 Final Value Fee $1.42
sergiojlee Final price: $34.00 (Fixed Price)

Aug 4 21:13:08 Lezioni e Saggi su Dante: Francesco de Sanctis; Einaudi 180146139892 Gallery Fee $0.30
Fee of EUR 0.22 converted to $0.30 at a rate of 1.37850 (as of Aug-04-07).

Sep 15 07:10:22 France Marianne 100 Francs used Scott 556 180159894788 Insertion Fee Store Inventory $0.05

Sep 8 18:35:34 Saxofón Saxo Saxophone Alto Púrpura Morado NUEVO 180157735283 Item Subtitle Fee $0.18
Fee of EUR 0.13 converted to $0.18 at a rate of 1.37720 (as of Sep-08-07).

Aug 4 16:58:23 Spanish English Electronic Dictionary Translator: IPA 180143277420 Final Value Fee $1.42
cacophonix1 Final price: $34.00 (Fixed Price)​
I have a bunch for 4 months (about 400-600) so I want to get them delimited so I can get to work with them. I ahve them in MSaccent as individual records with no delimitation.

I forget how to split a record. I would like to put a tab after the date; another tab before the long ID number; another tab after the long ID number; and the easiest I image: a tab in front of all the dollar signs (EXCEPT where it sa... Read more

A:access how to plit record

You will probably find it easier to split the data in Excel using text to columns

Read other 1 answers

In my code below I can't get it to actually go to the first record giving me the Value of App_ID in the 1st record in the database. It keeps on coming up with the same row and the same value for App_ID. I thought rst.MoveFirst would bring it to the 1st record in the database. What am I doing wrong?

What I want is to search the database for 16410020 in the App_ID and diplay a message FOUND if it is found and if it ends up EOF then display a message NOT FOUND.

Private Sub TEST_LOOP()
Dim AppID, App_ID, db, rst

Set db = CurrentDb
Set rst = db.OpenRecordset("tbl_EMAIL_Data", dbOpenTable)

AppID = "16410020"

With rst
If rst.RecordCount > 0 Then
App_ID = rst!App_ID
MsgBox App_ID
Loop Until App_ID = AppID Or rst.EOF
If rst.EOF Then
End If
If App_ID = AppID Then
MsgBox "FOUND!"
End If
End If
End With
End Sub

A:Access 2000, EOF and First Record

bsmith987 said:

With rst
If rst.RecordCount > 0 Then
App_ID = rst!App_ID
MsgBox App_ID
Loop Until App_ID = AppID Or rst.EOF
If rst.EOF Then
End If
If App_ID = AppID Then
MsgBox "FOUND!"
End If
End If
End With
End SubClick to expand...

Looking at your code, you execute a movefirst, and then do a movenext before checking to see if the first record is the one you want. So, this code will always miss the first record. Try using a while instead of a do.
while not rst.eof and rst!AppID <> APPID
if rst.eof then
'msg not found
'msg found
end if
Good luck,
PS. Why use a <i>with rst</i> and then proceed all references with <i>rst.</i>?

Read other 3 answers

Hi guys.
Just a couple of quick questions (I hope).
I have a user who enters vehicle delivery and handling details into a form in an Access db. She wants to add a new form for additional details about the same vehicles (records).
The two forms would be linked via a button on each in the header area of the form, allowing the user to quickly switch back and forth between the two.

What I need to know is, if I search for a record in form 1, and then click the button to open form 2, can I make the same record appear automatically?
Am I making any sense?
Okay, so I've searched for record number 6 on either form, I've clicked the 'switch forms' button, I wanna see record number 6 smiling back at me.
It sounds like it's something really simple, but then again, this is Access.

Second question, do you think I should add the fields for the new form into the same table that supports the original form, or into a new related table?



A:Access 97 - go to same record in another form

Read other 8 answers

I'm trying to delete a record in my Access Database and it will not allow me to delete or modify the record. I'm getting an error that reads "Reserved Error (-1601) there is no message for this error"
I tried in Forms and in the Datasheet view. No go! Any ideas?

A:Can't Delete Record in Access

Does the record look corrupted? Do you see funky values?

If you're running 2000, do tools > db utilities > compact and repair. You will prolly get a table called something like CompactErrors, look for it. Then delete it. Then reopen the table, find the record, and you should be able to kill it.

97 is the same, except you need to Repair first and then Compact, not all in one step yet...

Read other 3 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


My credit union has an online service. I can check my account balance & transaction history.

From the main page I click a link. The next page asks for my acct. number & pin. I put it in, click, & the next page tells me the balance of both savings & checking. To get the transactions for either acct., I have to click the link for the acct. I want to check. So, I click checking and the next page tells me that this page cannot be accessed.

The tech help at the CU told me I needed to have cookies enabled. My cookies were enabled. They had no further idea what the problem might be. Can you help?


A:Why Can't I Access My Bank Record?

Read other 11 answers

i have a table that has numeric fields (a,b,c). within each record i want to average the data in each of these fields. in other words, i want to average a,b,and c. and then have a report that one of the columns in the report is the average of the 3 fields.

A:averaging a record in access

That should be fairly straight forward. Make a query that adds up colA+colb+colc and then have another column that will take the results of the first and divide them by three....something like [Expr1]/3

Read other 3 answers

Does anybody know how to change the ordering of fields/records when programmatically entering them into a DAO record set - Fields appear vertically and records horizontally.

A:Access Record set ordering

Read other 8 answers

hi, i recently started using access 2007. i am not an avid programmer, but managed to create tables / reports / forms for a small database application at our office. an overview of the architecture would be - users enter the data (customers / leads) from their front ends, manager verifies and adds some more data. thats it. i have created a few reports to check the activity.

now i have an issue, of late my manager complained that the number of applications generated by his team was too high (100 a month) and he was scrolling through the form to check each record. if he had to go to the 52 record, he has to scroll through all the 52 records from the begining. can anyone suggest a simple design where in my manager can go to a record of his wish. i am not a s/w programmer,so i would be greatful if you guys can keep it simple.

thanks in advance.

Read other answers


I am trying to record changes in the price increase in a products table of a Database

Basically, i make a percentage increase in the price in the products table, but i need to keep a record of the changes, i don't need to keep a record of the original price, just a record of the product, the date the change was made and % increase.

i'm using a query to update the table with the increase, so i'm not sure if i should be using this to read to another table with the updates or if i should create another table linked to the products table.

Any help will be much appreciated.

A:Keeping a record of changes in Access

Read other 9 answers