i have an issue with the find record functionality
i have a main form that has a search button which works fine
i have a link to a popup form which in turn also has a search button but clicking this produces an error as below
run time error 2046
the issue seems to be the caused by the fact that the main form is still running in the background - if i open the popup form directly the search works fine
is there a way to get the search going on the po up form with the main form still running in the background?
OK, usually I can figure these things out for myself, but I'm realy stuck on this one and any help would be appreciated
background: I work in a small scale pilot production line, and we take a series of measurements for every part that we make, each of which has a unique ID. Sometimes we need to take the measurements more than once, so that the data output from the measurement system (which it can append straight to an access table) has a part ID and a measurement number, the combination of which is unique (for reasons that I won't go into it is not possible to combine them into a single field, otherwise we would do this)
problem: The measurement system can be temperamental and sometimes sends the same record more than once, and It is horribly time consuming to go through and check manually It occured to me that we could send the measurements to table1 (where they would be stored temporarily), and write a sub to go through each record in table1 in turn, compare the part ID and measurement number to the records stored in table2 (where they would be stored permanently), and append the record to table2 only if the part ID and measurement number combo has not already been taken, before moving onto the next record in table1 and doing the same thing
The part I just can't figure out is how to go through the records in turn and compare them, I can do the append and deletion using SQL, that's not a problem.
if anyone can point in the right direction I'd be realy grateful (or tell me if I'm barking up the wrong tree completely)
I've rebooted my copy record button and just used the macro wizard for now, it seems to work as far as I can tell but there is something strange about it.
I've added in some text boxes so I've got some confirmation, but when I click this copy button I get the following error;
"The command or action 'RecordsGoToNew' isn't available now."
I have a database which has a main form and subform built in linked by parent/child customerid, what i would like to do is search all the subform records from the whole DB and return its parent record on the main form?
Can this be done? because if i use find it will only search the filtered form i have onload of the form?
:confused: Anyone know how to trap/prevent the msg "The DoMenuItem action was cancelled" after answering no to deleting a record? I followed the instructions at the following thread but no luck:
---------------------------------- Private Sub Delete_Click() On Error GoTo Err_Delete_Click DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70 Exit_Delete_Click: Exit Sub Err_Delete_Click: MsgBox Err.Description Resume Exit_Delete_Click End Sub
----------------------------------- Private Sub Form_Delete(Cancel As Integer) DoCmd.SetWarnings False If MsgBox("Are you sure you want to delete this record?", vbYesNo) = vbNo Then Cancel = True Else MsgBox "Record deleted!" End If End Sub -------------------------------------
Hello to all, Little new in Access i would like to know how to use the key to find directly to a record in a table. ie : i have a table where the primary key (unique) is a date, using VBA i would like to know the instruction to find directly the record 01/06/2004 for exemple. Thanks in advance. VINCENT
I forgot to mention that my form is based upon a table, i have created other tables and forms based on this one therefore I don't want to change a lot of stuff. I tried the forum but nothing helped.
I have a form with about 10 fields, i added a find button to search for a record, using three fields, when this button is click i want it to display all the info pertaining to the search criteria, (this will be displayed on the same form populating in the form which contains other feilds) or a error saying record not found.
Hi, i am a beginner to access and need some help if someone would be kind enough... i have a table (tblCustomer) which has all the standard customer details such as name, address, phone etc. The primary key of the table is a autonumber field (Customer ID). i have autoformed it so all the fields are now on a blank form. I want to add a text box to the form so that i can find a record by typing the customer's surname. Once this has been searched, i would like the records to be listed in a table in a subform further down the original form. I would then like the user to select the correct record they are looking for from the sub form, and the details to come up in the main form so they can be edited. The reason for the whole sub form part is because there may be more than one customer with the same surname. please could someone suggest how to achieve this.
Hi, i am a beginner to access and need some help if someone would be kind enough... i have a table (tblCustomer) which has all the standard customer details such as name, address, phone etc. The primary key of the table is a autonumber field (Customer ID). i have autoformed it so all the fields are now on a blank form. I want to add a text box to the form so that i can find a record by typing the customer's surname. Once this has been searched, i would like the records to be listed in a table in a subform further down the original form. I would then like the user to select the correct record they are looking for from the sub form, and the details to come up in the main form so they can be edited. The reason for the whole sub form part is because there may be more than one customer with the same surname. please could someone suggest how to achieve this.
I have navigation between forms and when a user navigations from the main form(candidate) to another form(1) and then back there is only 1 record displayed on the candidate form as it is only bringing back the record tied in by the application number. So if you then want to search for another candidate it doesn't work because the candidate form is filtered.
I've tried using this in my find function but it doesn't work: DoCmd.GoToRecord , , acFirst
I have 12 fields, each containing a number. I want to display the last non zero value in a query. I've looked at "last" but this returns the items in chronological order, which is not neccessarily the order my data is entered in.
I have a form with a form header section that contains a combo box and a text box. The form also has a detail section that has a tab control that contains the rest of the data entry boxes. I put a Find Record button in the detail section of my form. When I try to Find Record using the combobox or textbox values in the form header, I get an error saying it cant search the tab control, use the Gotocontrol action before the Find Record Action, change current field action from yes to no, or change the focus to a searchable control. If I search items in the detail section I do not get errors. The code created by the Find Record button is below. I'm not sure how to get it to set focus to the appropriate box in the form header section if that is the field I am searching on.
Private Sub cmdFind_Click() On Error GoTo Err_cmdFind_Click
I have a large database I set up and we have been using fine for a couple of years now.
All of the sudden, anytime Find Record is clicked and the value is entered, I am getting the following error, on ALL forms. Nothing has been changed in the DB itself and it worked GREAT before.
The control 'Command 138' the macro is attempting to search can't be searched.
Try one of the following: * Add a GoToControl before the FindRecord action. * For the FindRecord action, change the Only Current Field action argument from yes to no. * Change the focus to a searchable control.
Can anyone help? It is VERY frusterating and I can't figure it out.
I have a combo box that displays LastName FirstName.
If I have two people with the same lastname it finds the first one in the table w/ that last name. Please help with my code so it searches by firstname and last name. Thanks in advance.
Kacy
' Find the record that matches the control. Me.RecordsetClone.FindFirst "[Contact_LastName] = '" & Me![cboContact] & "'" Me.Bookmark = Me.RecordsetClone.Bookmark
I've enclosed a screenshot as it tells the story pretty well by istelf.
I would simply like to be able to click any item in the listbox (populated from a query simply showing all records in a table). Once an item is clicked in the listbox, I'd like the form to go to that record (this is to enable quick finding and deleting of records).
I've been playing for a while, and can't figure out how to make Access go to the record that's selected in the listbox.
On one of my forms I have a command button to find a record. The Find button is supposed to locate a record based on it's job number, this is not a primary key. I have this feeling it has something to do with the field Job Number because it is like this throughout the db (it is only recognizing the first record.) I even tried putting in another record but it still only recognizes that one record. What did I do wrong?
Hi, Newbie problem. I want to display on a form the last entry or (record) from a particular field of a table (the date field of the last club event). I have set the Form Property of 'Data Entry' to 'Yes' to prevent the user from having to scroll through records to get to the next blank record. Could someone kindly give me a clue how to go about displaying that last record of the field. Thank you.
I have developped a table and some forms reated to that.Since the main survey is quite long, I developed 4 forms to enter the data. Now I have a question related to data entry.Suppose I start entering data for one record and I decide not to fill up all the 4 forms, I simply decide to go back to it later. How can I go to the same record and keep entering the data from where I left?
If I am in Datasheet view, I can easily use the Find option to look for the record. However, I dont seem to be able to understand how I can open the form of that record to enter the remaining data.
I know you can create a find record command button really simply, which when clicked will display the find and replace window.
What i want to do is create a command button that will search a specific field that i specify in a report for the criteria i enter.
i.e i have a customer information form, which contains
AccountNo CompanyName Address Postcode Tel etc
what i want is a button that when clicked brings up an input field that allows the user to type the name of the company into this field, then when either the enter key is pressed or another button on this pop up window the matching record will be displayed or a error window stating that there are no matching records. Can anyone help me with this.
Note: Dates are in "dd/mm/yyyy" format. Also, not all data is in order in the table. It’s not how I would have designed it but that’s what I need to work with!
I would like to run a query that groups by custID & itemcode and also the most recent date for any price change. I would then like the query to display the relating price for the record it pulls out. (EG for custID 'AAA' and item 21, it would display the price of £5 as that is the value for the most recent price as of 01/06/2005) I then want to link the custID & itemcode to another table that has sales in, to check that we are using the most recent price.
Is there a way I can do this via a query or do I need to put some code together?
I have a training database with multiple courses. Certain staff do course1 and thereafter course2. Course1 is only done once and course2 is a refresher done annually. I want the query to find staff that have done course2 but not course1.
I'm fairly new to SQL and have a problem finding the latest record.
Lets say I have a development project that has many disbursal payments to be sent. I want to find the latest disbursal record created for that one project instead of having all of the disbursal records show on the query.
I'm trying to work out how to do this in a query but haven't got a clue where to start.
Please, if anyone can help I'd be very grateful!:D
I have a search form with 1 combo box and a button which when the user inputs an invoice number and clicks the button, a main form is opened for that particular record.
The problem I have is to display an error message before the main form opens if the user has either left the combo box blank or they have input an invoice number that doesn't exist.
I have a form and I have added a combo box to quickly find records. I used the wizard to set this up as I did not know the code. Anyway this works, but it displays the wrong value - it displays the ID number and not the text value from the table.
The record source is a table not a query.
What am I doing wrong here, I have tried changing the control source and it doesn't work.