Record Source Does Not Exist

Oct 7, 2004

I have set up a simplified event booking procedure, similar to the one generated by the access event manager wizard. It uses three tables, one with attendees details, one with the event details and abooking table that links the attendee ID with the Event ID.

The booking table uses commands similar to SELECT[Names + Contacts].[ID],[Names + Contacts].[Surname]FROM[Names + Contacts] to generate drop down lists of surnames and events so that the two can be matched together.

This works fine as a table.

However when placed into a form, whenever the form is opened I get an error message saying the record source specified on the form does not exist.

I have tried regenerating the form, etc. I have used a wizard to generate the form, closed the form, not changed anything in the database and then tried reopening it and I get the error message, can anyone shed any light?

Also if you accept the message then it knows how many records there are, so it must know there's something behind it, also if you change to design mode and then back to form mode, it finds all the data.

View Replies


ADVERTISEMENT

General :: Record Source TblName Specified On Form Or Report Does Not Exist

Aug 21, 2012

I have an application written in Access 2007 and packaged using the Packaging Solutions for deployment with Runtime.My problem is that I've written an updated version, and after carefully saving my original Back End away from the install site, uninstalling Runtime and the FE, installing the new FE with a blank copy of the BE having the same name and Runtime, and copying the filled BE into the same folder with the FE (replacing the linked, but empty, BE) I find that SOME of my tables in the BE are not being recognized. This isn't true of all tables. I can open some of the forms and find everything there. In other cases I get the following error message "The record source "tblName" specified on this form or report does not exist."

View 2 Replies View Related

Modules & VBA :: Runtime Error 2580 - Record Source Does Not Exist

Jun 9, 2015

I currently have this set as the forms default recordsource (which works just fine):

Code:
SELECT TOP 5 tblUsers_Phone_Book.EMAIL_ADDRESS, weightedDL('me@mine.com',[EMAIL_ADDRESS]) AS Expr1

And I have this vba to dynamically switch around that email address.

Code:
Private Sub Form_Load()
Dim intPos As Integer
Dim strControlName As String
Dim strValue As String
Dim sSQL As String
If Len(Me.OpenArgs) > 0 Then
' Position of the pipe

[Code] ....

If I msgbox the sSQL - it shows identical to the default recordsource but I get the error:

The error message I get is:

Run-Time error '2580'
The record source 'SELECT TOP 5 tblUsers_Phone_Book.EMAIL_ADDRESS, weightedDL('me@mine.com',[EMAIL_ADDRESS]) AS Expr1' specified on this form or report does not exist.

I tried copying the exact working default sql into the vba and get the same result.

View 3 Replies View Related

Forms :: Combo Box Search - If Record Not Exist It Will Display Msgbox To No Record Found

Oct 28, 2014

I have a problem with my database I have a combo box that will search for my record. Actually its working I input the specific number it goes to the specific record. But I want, if there no existing record in my database it will display a Messagebox that "No record Found" I try to put a code in a macro builder in a after update property field but nothing happened.

Expression code that it will display the msgbox if there's no record found.

the given code from macro builder is attached. I try to have an if else statement but I dont know how to not equal that giver conditional expression.

View 10 Replies View Related

Remove Record Source/Control Source

Sep 19, 2005

I have an unbound form with three tabs. On each tab there is a sub form. Each tab is a search form and each sub is a results returned. I have made everything unbound and set the sub form recordsource and its controls control souce on afterupdate of the main form search criteria. Works fine except for after some use the db decides the sub forms are not unbound and sets the record source and control sources.

I'm trying to do a

Me.PollingPlacesResults.Form.RecordSource = ""
Me!PollingPlacesResults!PollID.ControlSource = ""


but this does not seem to work in actualy removeing the record source and control source.

View 14 Replies View Related

Modules & VBA :: New Record Error When No Record Exist

Dec 12, 2014

What I've done is setfocus from another subform to this subform, and I want to add a new record. I've got my code mixed up somewhere along the line as it's saying "the command or action 'RecordsGoToNew isn't available now.I'm trying to setfocus to this form, create a new record and setfocus to a field within the focussed form.

The code I'm currently using is...

Forms!frmtopline!frmTopLineSub.SetFocus
RunCommand acCmdRecordsGoToNew
Forms!frmtopline!frmTopLineSub.Form!TransactionDat e.SetFocus

View 2 Replies View Related

Check To See If A Record Exist

Nov 27, 2007

I would like help with a macro that looks to see if a record in my database table exists, then if it doesn't it adds a record with my data, but if the records does exist, it stops the routine and sends a message box to prompt if you want to continue with adding a new record.

The problem that I'm having is that my macro errors out when it doesn't find a record. I just want my macro to just see if a record exists or not. Then I can write my Iff statements based on whether it finds our or not. How do I just have my macro check for an record, then if it doesn't exist tell that it doesn't exist and not stop my macro. Is there some kind of IfExist() function or something?

Thanks for any help anyone can give me.

View 4 Replies View Related

If Record Doesn't Exist

Feb 21, 2005

I'm using the following code to autofill the city and state on my form.
I can't figure out how to capture if there is no matching record in the table.
If there is no matching record, I will:

1) inform the user with a msgbox
then if the user wants
2) open a form to add the record to the table


Dim rst As DAO.Recordset
Dim db As DAO.Database

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



rst.MoveLast
rst.MoveFirst

Do Until rst.EOF

If strZipLookup = rst!ZipCode Then
Me.txtCoCity = rst![ZipCity]
Me.cboCoSt = rst![ZipState]

End If

rst.MoveNext

Loop

rst.Close
End If

How can I capture if there is no matching record in the table?

Thanks,

Sup

View 2 Replies View Related

Find A Record That Doesn't Exist

Oct 26, 2005

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.

Thanks.

View 3 Replies View Related

Delete Record Only If Child Records Don't Exist

Aug 6, 2005

Hi,

I'm trying to have a button on a form that would delete a record from a table only if there are no child records linked to it.

If there are child records for the selected record, the button would be disabled.

Is there a simple way of doing this?

TIA.

View 3 Replies View Related

Record Lock Status & Exist Query

Feb 12, 2007

Afternoon.

I have had a search through the forum however am unable to find anything...

I have two questions:

a) How do I check whether someone else is currently accessing a record / form?


i.e. Opening the form (SchemeDetails) like this:

DoCmd.OpenForm "SchemeDetails", acNormal, "", "", acEdit, acNormal
Forms!SchemeDetails.SetFocus
DoCmd.GoToRecord acForm, "SchemeDetails", acGoTo, tempVal

Can I check if someone else is in the specified record before I open it? Record Locking is (deliberately) set to "No Locks".

b) How do I check to see if a table exists?

i.e. If DataTable2.Exists = True then ...
Or something like this?


Hope someone can help me!

View 6 Replies View Related

Append If Record Doesnt Exist, Else Update

Feb 19, 2008

I have a table that is filled based on selections that a user makes in combo boxes on a form. I am having trouble trying to figure out the best way to prevent duplicates from being inserted in the table when I do the append query part.

Since the table is filled based on the various selections the user makes I dont have a primary key or unique field.

Can someone help me figure out the best way to do this append/update queries to prevent duplicates. Also if you have a strategy for setting up some sort of unique or primary key for fields that could all be the same yet in the table only 1 record will show, no duplicates.

View 1 Replies View Related

Set Record Source Of Combo Box

Apr 25, 2005

Hi all,

I have a form with a combo box on it and what I would like to do is when I click a command button, change the record source of the combo box from the query I currently have to a different one?

Is this possible,

Thanks for your time.

Taff.

View 8 Replies View Related

Record Source From Another SQL Database.

Nov 2, 2006

I have multiple SQL databases and on most have searches built on stored procedures.

I'd like to create a central search database but can't get Forms to go across SQL databases to get their record source.

Am I being thick?

View 2 Replies View Related

Help With Record Source And Recordset

Jan 24, 2005

I have a form with a record source already defined (used so the user can browse through records and edit them)
I have the form store requirement ids and not the name however I would like to present the requirement name rather then the id to the user
So it tried with a sql query and a recordset but I keep getting the error data type mismatch in criteria expression on this line
Set rsm = dbm.OpenRecordset(sRequirementName1)

I think the problem is having the record source already defined and then having a new Recordset not sure how to work around it

here is the code
----------------------------------------------------------------------------------------------------------------------------------------------------------
Private Sub Next_Click()

Dim sRequirementName1 As String
Dim queryResult As String
Dim wsm As workspace
Dim dbm As Database
Dim rsm As Recordset

sRequirementName1 = "SELECT Requirements.RequirementName " & _
"FROM Requirements " & _
"WHERE Requirements.RequirementID = '" & Me.RequirementID11.value & "' "


Set wsm = DBEngine.Workspaces(0)
Set dbm = wsm.OpenDatabase("E:Practicum Hours.mdb")
Set rsm = dbm.OpenRecordset(sRequirementName1)

queryResult = rsm.Fields(0)

Me.HoursCompleted11_Label.Caption = queryResult


End Sub

----------------------------------------------------------------------------------------------------------------------------------------------------------

I have also attached the DB if anyone thinks they can help, if you are confused about what i am trying to do with the modify form i made one with students that works
it is the modify hours1 form and the code above is the on click event for the next button

Thanks for any help anyone might offer

View 2 Replies View Related

Change The Sub Form’s Record Source

Nov 16, 2005

I have a main form that has 10 sub forms Each sub form’s record source is link to a different Query.

It takes more then a minute to open the form, (because it’s running the query for all sub forms). So I changed the sub forms source to SELECT * FROM tblTest WHERE false;

I also changed the main form. When the button on the main form is clicked, it’s adding the following:

Me.SubMySub.Form.RecordSource = "select * from qMyQuery"
Me. SubMySub.Form.Requery

However, after I close the main form, the sub form’s record source stays linked to
SELECT * FROM qMyQuery;

And will take the same long time again to open the main form.

Does anyone have any solution?

View 7 Replies View Related

How To Use Same Form By Changing Record Source?

Feb 8, 2005

Hi all,

I have Form F_CashSalesHead with a subform F_CashSalesInvFoot with one-2-many relationship on their tables. Subform contains a checkbox field that I use to lock the record set (On a command button click it runs one update query to add value 1 to each checkbox to make Enable=False all the records of current invoice on the form).

One-2-many relation ship is made on InvNum field in both tables.

When I open F_CashSalesHead form, bcz of some code line I wrote on On Load event of F_CashSalesHead , at the beginning it give massage how many invoices are pending to lock and would you like to see. If click “Yes” to see list, it opens a small form that called F_Count_Unlocked_Invoices showing invoice numbers and unmarked checkbox which is pending to lock. This small form is based on following query,

SELECT DISTINCTROW T_CashSalesInvFoot.InvNum, T_CashSalesInvFoot.CashSalesCustomerName, Sum(T_CashSalesInvFoot.Lock_Cash_Inv) AS [Sum Of Lock_Cash_Inv]
FROM T_CashSalesInvFoot
GROUP BY T_CashSalesInvFoot.InvNum, T_CashSalesInvFoot.CashSalesCustomerName
HAVING (((Sum(T_CashSalesInvFoot.Lock_Cash_Inv))=0));

This works fine.

What I am looking for is, I want to use the same F_Count_Unlocked_Invoices form for Credit Sales invoice also with the same trick. Because I don’t want to create another same form and write code that help to increase size of db.

Can it be done just by changing record source of form F_Count_Unlocked_Invoices? Or what is the way to do it?

With kind regards,
Ashfaque

View 2 Replies View Related

Cacading Combobox Record Source

Mar 18, 2005

Hi, I need help on cascading combo boxes, in my form


In my example DB i have 3 tables(when i find a soloution i will implement it on a larger scale database which will have around 15 tables). I need to create reports of these tables. The problem was that i need to filter the data before i create the report by 2 fields. If i was to do this the straight forward way i would have 3 tbls, 3 qrys and 3 reports (which on my final database would mean 15 of everything.)

So i've decided to use a form driven system to reduce the number of forms and querys i have in the DB. Using a form based system i should have 3 Tables (called 1, 2 and 3), 1 Query (called query2), 1 Form (called withselect) and 1 report (called rptquery1).

Now to the system.

The form should have 3 combo boxes. 1 at the top to select the table i want to query. Then 2 others to select the fields by which to filter. the form should also have 2 buttons, 1 torun the report one to return reults in a table to edit the data if needed.

This is the current problem i am having

In the forms 1st combo box i have managed to list all my 3 tables (thanks to FancyPrairie) using the following code:

SELECT MSysObjects.Name, MSysObjects.Type
FROM MSysObjects
WHERE (Left$([Name],4)<>"MSys") AND (Left$([Name],4)<>"USys") and (Left$([Name],1)<>"~") and (MSysObjects.Type=1)
ORDER BY MSysObjects.Name;

But i cant select any thing in the following 2 comboboxes. At the moment im tryin to use this code in the record source of the 2nd and 3rd combo boxes

SELECT * FROM YourTable WHERE (YourTable.TableName=[Forms]![withselect]![Combo6]);


Attached is the latest version of the DB.

Im getting the error:

The record source 'SELECT * FROM YourTable WHERE (YourTable.TableName=[Forms]![withselect]![Combo6]);' specified on this form or report does not exist.

Hopefully someone can help.

View 6 Replies View Related

Changing Record Source On Subform

Mar 25, 2005

Hello, I have a form with a subform. I want to change the record source on the subform during an OnClick event. I am not sure what I'm doing wrong, but I get a "object does not support this method" error. Can anyone help? Thanks in advance.

View 1 Replies View Related

Cascading Form Record Source

May 17, 2005

Heya. I hate posting yet another cascading query but I just poured through the first 40 bits and couldn't find something similar.

Basically, I seem to have an errored idea in how to effectively used cascading boxes on a larger form-wide scale.

Basically I have a form with an unbound combobox in the form header: cboSchool

The detail section should only have two fields, StudentID (txtStudentID) and a boolean (bolOT) both of which exist in a specific table source (tblStudents). StudentID is a locked field.

What I would like to do is only have the StudentID's available that are valid for the school. I attempted using a query in the record source that would reference cboSchool but I keep ending up with blank forms. (There's a string of queries that link the schools found in cboSchools to StudentID)

Any ideas?
~Chad

View 5 Replies View Related

Record Source Problem On Form

Jan 10, 2006

Hello,
I'm having a strange problem and was wondering if anyone can help me out. I have a form that is for inputting and modifying data in one table. It used to work when you opened the form you would see x amount of records. Now it's opening to 1 blank record. If you hit filter it fliters like 1700 records and then when you unclick it, you get the entire 10000 records. I thought it had something to do with the Record Source in the properties but when I fixed that it still didn't work. Any ideas?
Thank you!

View 2 Replies View Related

Show Two Different Records From Same Record Source

Oct 12, 2006

Hi,

I am trying to create a textbox that will show a document number of the last record so when a user clicks add new document he/she knows what document number to enter in next. It must not involve the user looking a subform with the document numbers on it.

Thanks for your time,

Leon

View 2 Replies View Related

Get The Recordset From The Record Source Of A Form

Aug 31, 2004

I have 2 forms. On form1, the record source is a query. From form2, I need to iterate through the recordset from form1 and perform some action. How do I access the recordset from form1?

Thanks in Advance,
-jnoody

View 1 Replies View Related

Change Record Source On Report

Jan 14, 2005

OK. I have a report that I want to use as a master and use with about 4 different querys. In the report properties I've bound it to a query. I've tried for ages to change the record sources with on click command bottons on another form. I think things have become complicated because there's a subreport on the report I AND a there's bunch of code to make things invisible in the on page event of the report.

anyway, here's what I'm using:

DoCmd.OpenReport "rpt_master", acViewPreview
Me.RecordSource = "qry_rptPrintRollClass"

Is this the right way to do it??

Any ideas on how I can clean it up??

Thanks

Damon

View 2 Replies View Related

Display Info From Different Record Source

Feb 27, 2006

Hello once again,
I am wondering how I can display information on a form that is not of the same record source without using a subform.

Right now, I have a form setup with qryAll as the record source which provides the information to a listbox i have setup on the form. When I select something in this list box, I want to display information related to it from a table based on a CenterID. Is this possible to do? I won't need to edit the values, I just need to display them into a textbox or something.
Jared

View 1 Replies View Related

Forms :: Record Source Set From Another Form

Jun 19, 2014

This code loads a new subform in the frame. It then scopies a value to an input field but then i need to set the record source and display the data. This latest pasrt does not work.I've been trying for some time now by changing the part before recordsource but no luck.

Code:
gekozenwo = Me.Keuzelijst0
Forms!switchboard.subfrmWindow.SourceObject = "frmInformation"
Dim frm As Form
Set frm = Forms!switchboard.subfrmWindow.Form
frm.DataEntry = True
Forms!switchboard.subfrmWindow.Form!Tekst33 = gekozenwo
MsgBox gekozenwo

frm.RecordSource = "SELECT * , [orders_maint_detail]![woisnr] & ' / ' & [orders_maint_detail]![Ordernummer] AS Expr1 " _
& "FROM orders_maint_detail " _
& "WHERE (((orders_maint_detail.woisnr)='" & gekozenwo & "'));"
Me.Requery
wonr = gekozenwo

View 2 Replies View Related







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