MDB....underlying Changing Data Source

Dec 1, 2006

Hi!

I have an MDB file that points to a postgres database. What I'm trying to do is to redirect it to another datasource. The database is exactly the same, but I just need to point it to a different location. I tried doing this with linked table manager by refreshing the table and enabling the "always prompt for new location". I was able to point to my new location but what happened was my MDB became readonly, I am unable to edit anything after I changed the datasource.

View Replies


ADVERTISEMENT

Changing Data In Query Results Changes Data In Source Table

Dec 17, 2012

I have a table and a simple query that pulls results from the table. Nothing too crazy. But, if I were to go in and change some of the data/values in the query results it will change the respective data in the table. I know that this cannot be right. What do I have to do to either prevent the ability to change query results and/or prevent any changes in the query from altering the original data in the table.

View 2 Replies View Related

Changing ODBC Data Source?

Jul 23, 2014

I am having difficulty with my Access database, when I run a particular query. The query is linked to a table in SQL Server, but I keep getting a "ODBC -Call Failed" error message. After some research I understand I might need to change the ODBC Data Source, but this is something I have never done and am unsure of how to do it so my query will work!

View 2 Replies View Related

Changing Data Source (table) For A Query

Jul 18, 2006

Hi,

I have two Tables TA and TB. I have a set of queries based on TA. I want to substitute TB for TA (i.e. TB will stand in place of TA). I want the old TA queries remain unchanged but now be based on TB.

If I delete TA and then rename TB into TA, I will lose the queries. Therefore I want to 'point' the queries (in the most efficient way) to TB instead of to TA.

Then I can delete TA. Then I can rename TB into TA and the queries will follow along, I expect.

I have been trying in vain to find a way of pointing the queries to TA instead of TB? How do I do it?

I have done it with Forms (Design Views, Properties), where I can select a datasource. But where is the corresponding thing enabling me to select a datasource for Queries?

Thanks.

Adrian

View 13 Replies View Related

Reports :: Multiple Subreports And Underlying Data

Mar 31, 2013

I need to create a report based on how a user creates construction components of which there can be any number, e.g.

Component 1
Component 2
Component 3
...
Component n

Each component has different data.

A report is needed to show the above components. The issue I am having is this - the user can select components to be repeated as follows:

Component 1
Component 2
Component 3
Component 2
Component 3
Component 2

I have created subreports for the components but when I run the report (no master/child relationships defined for any of the subreports) I get:

Component 1
Component 2
Component 2
Component 2
Component 3
Component 3

So I created a master report (in design time) and added subreports using VBA and now I get the components in the correct sequence, but how do I get the data to show up correctly because at run time the same query runs for each subreport component and I end up with the above sequence.

Defining the subreport query at design time won't work because then the subreport for a particular component will show the same data.

I need each subreport to recognize which data to show at run time - but I am not sure how to accomplish this.

I'm trying to stay away from duplicating subreports in the case where the same components are selected.

View 1 Replies View Related

Forms :: Embedding Image In Form Not Linked To Underlying Data

Jun 28, 2013

I have a form that I call the AdminForm. It allows the user to store administrative information about the business; business name, address, telephone number, etc. I also have as a part of the table that stores this information an Attachment Field where an image of their logo is stored in a field called, [Logo]. No problem here. The issue is that I want to use the [Logo] field elsewhere like in reports.

I've added an Attachment type control to the report and I've used DLookUp to use the image stored in the admin table, but it doesn't display on the report. There isn't any relationship between the admin table and any report so I can't join them unless I do something "unnatural" by adding a fictitious field to every record to tie it back to the key field in the admin table, (there is never more than one record in the admin table; I ensure that). That doesn't seem like the right way to accomplish this.

View 9 Replies View Related

Changing The Source Of A Textbox

Jul 14, 2006

A simple question that would probably take me hours to figure out by myself: When I want to change the source of a listbox, fx. when a button is clicked, i use the command 'rowsource ='. But what command do i use to change the source of a textbox...??

Thank you in advance :-)

// JR

View 5 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

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

Forms :: Changing Source Of Combobox

Jan 26, 2014

I have a form (named Example) to create reports by selecting fields from tables or queries. there is a option box (name is KynkSec) with two options (Table, Query) and a combobox named as KynkTurSec.I want to change the data source of combobox either table or query. By afterupdate, that combobox is requering the listbox "ListKynkAlan" and I can see fields of selected table or query. (That is my dream))Unfortunately I can not do that. Combobox is showing only tables or both of tables and queries. But not only query.

Here is str source of my combobox:

SELECT MsysObjects.Name, MsysObjects.Type FROM MsysObjects WHERE (((MsysObjects.Type)=1) AND ((Left$([Name],1))<>"~") AND ((Left$([Name],4))<>"Msys")) OR (((MsysObjects.Type)=5) AND ((Left$([Name],1))<>"~") AND ((Left$([Name],4))<>"Msys")) ORDER BY MsysObjects.Name; That is showing both of tables and queries.

And I wrote a code for KynkSec option box;

Private Sub KynkSec_AfterUpdate()
' Populate rowsource of KynkTurSec
Dim strSQL As String
On Error GoTo HandleErr
Select Case KynkTurSec

Case 1

strSQL = "SELECT MsysObjects.Name FROM MsysObjects" _
& WHERE(((Left$([Name], 1)) <> "~") And ((MsysObjects.Type) = 1) And ((Left$([Name], 4)) <> "Msys"))
Order BY(MsysObjects.Name)

Case 2

strSQL = "SELECT MsysObjects.Name FROM MsysObjects" _
& WHERE(((Left$([Name], 1)) <> "~") And ((MsysObjects.Type) = 5) And ((Left$([Name], 4)) <> "Msys"))
Order BY(MsysObjects.Name)
Case Else
End Select

[code]...

But this code is not working and giving a warning messsage "Sub or function is not defined"..So How can I change the source of combobox, either table or Query?

View 3 Replies View Related

Changing Source Database String On Append.

Feb 12, 2007

Hello,

I think i've done this before but I can't seem to remember the process so any help would be great. What im trying to accomplish here is I have a database that will be updated(new data appened) to on a daily basis from many other databases, but the data that is to be appened can come from various destination drives ie (C: drive, D:drive, CD, Thumbdrive, etc). I set up a dialog box that prompts the user to select the source database, but im not sure how I can store that source destination string and update my append query with that source database string. I believe there is a way to do this. Am I making any sense? Any help would be so great. Thank you in advance.

-James

View 1 Replies View Related

Changing Table Source In Query Using Vb Instead Of Manually Doing It.

Aug 17, 2004

I have a Query called Median and all it does is pulls all the fields and all the records from 1 table. Since the Query is connected to a lot of other queries, and the table it's connected to changes twice a month, I was wondering if there was a way to set this up in a form maybe using vb, so a user could maybe Click a new table from a combo box list of current tables in the database, then click a button that says "Change", and it change all the fields to the new table and removes the old table from the query.

Or what might be better is: Already on the form, i have part of the name of the new table already entered by the user (it bases the new name of the new table off this text box). So, what I can use is the Text in that box and an & " the rest of the tablename", and automatically change the table in the Median Query based on that criteria. If that is too complicated, then a combo box will be sufficient.

Another way i guess, would be to setup a hidden field that takes whatever's in my text box (which is a date) and adds " the rest of the tablename", then I could base the replacement table of the Median on that one text box.

Anyway, is there a way to do this?

View 6 Replies View Related

Forms :: Changing The Record Source From Within A Subform

Nov 2, 2014

Can I change the Records Source of a subform from within that subform and do a requery to have a different set of records displayed'

I want to be able to refine the records displayed in the subform

View 8 Replies View Related

Changing Subform Source Object Causing Problems

Aug 30, 2005

I'm trying to change a database that consists of a sequence of subforms held individually within different tabs on a subform. There seems to be a bit too much going on, so I've decided to leave the subforms unbound, and set them when the appropriate tab is selected, and unset them when the tab is changed. For most of the subforms, this works fine...

However! There's always an exception!!!

On one of them, when I set the sourceobject, it automatically populates the linkchildfields and linkmasterfields properties with an inexplicably crazy number of fields, most of which aren't even on the forms in question. I've tried to get around this by setting linkchildfields and linkmasterfields after changing the sourceobject. This does not work!

The first thing that happens is it returns error 2335 (relating to an imbalance between the number of fields) when I set linkchildfields. I try to get around this by trapping and resuming to the next step so it sets linkmasterfields and restores the balance, but, despite the fact that the linkchildfields and linkmasterfields are showing the correct fields, the form acts as if it has been bound with the screwy list of fields, and starts asking for fieldnames which are on neither form as parameters. When I hit cancel the subform control is empty.

I'm at a loss as to what the problem is or how I should sort it out! Any suggestions gratefully received.

View 2 Replies View Related

Forms :: Changing Record Source Of Query Profile

Nov 4, 2013

My form has a Record Source of qry_Profile, it is a query that shows the user the records of the dogs that they currently own. I want to put a button in the form footer to allow the user to show the records of all the dogs that they have ever owned.

So my question is how do I change the record source with vb.

View 1 Replies View Related

Changing Record Source - No Functions / Events Work

Oct 24, 2012

I have created a system consisting of a data entry form etc. It was originally connected to one record source exported from a sharepoint site.I had to add a field to the sharepoint site and so i created this additional field and re-exported the data and changed the forms record source and all occurences in the code of previous to new record source.

However, this change of record source produces the following error on every single event.The expression On Load you entered as the event property setting produced the following error: member already exists in an object from which this object module derives.

I tried to break the code as soon as it hits the load function to track the error - but it doesn't even run this function so the code is not executing at all.When i connect back to the old record source it works fine.

View 1 Replies View Related

Modules & VBA :: Changing Record Source On A Form - 2 Different Outcomes Using Same Bit Of Code?

Apr 28, 2015

I'm changing a record source on a form when the user clicks a "save" button.

I'm doing this to store a value from the current form in a table that is not part of the default form query.

This works fine.

I have a separate button on my form called "Home", when the user clicks this button it requerys the current form which triggers the before update event to run, this in turn brings up a message box which asks the user if they want to save or not. If they click yes then it runs the SaveButton click() code.

For some reason when the user presses the save button and then exits, everything works but if a user presses the “home” button which triggers the save button then it brings up the “2107 The Value you entered doesn’t meet the validation rule defined for the field or control.” Runtime error and stops on the change recordsource command.

Why triggering the same code directly from a button or indirectly from a before update event has two different outcomes.

View 4 Replies View Related

Changing "record Source" In SubReports With VBA

Mar 28, 2005

I have an application with a form where 20 subforms are used to add data to the same table. The 20 subforms are used to divide the data being added into categories ( think of a grocery store with categories of "Meat", "cereal', vegitables etc)
I use the same subform (with different names) and change the record source on the formOpen event to change the subforms properties. A portion of the code is shown below.

tempRecordSource = "SELECT [tSkills Assessment].Skill, [tSkills Assessment].Scale, [tSkills Assessment].Comments, [tSkills Assessment].AreaOfFocus, [tSkills Assessment].SubSectionTitle " & _
"From [tSkills Assessment] WHERE (([tSkills Assessment].SubSectionTitle)=" & Chr(34) & tempSubSectionTitle & Chr(34) & " and ([tSkills Assessment].SkillsAssessmentID)=" & [SkillsAssessmentID] & ") ORDER BY [skillOrder];"
Me(tempSubFormName).Form.RecordSource = tempRecordSource

I use an array to feed the code (which is in a loop) the variables needed to assign the correct properties to all the subforms.

And it works great. Yes I know I could have created 20 different subforms, but in an attempt to keep my application simple I am trying to have less objects.

The problem is in my output (the Report).

When I try to do the same thing on subreports it doesn't work. I figured the logic should be the same but the code that corresponds to the form code "Me(tempSubFormName).Form.RecordSource = ..." doesn't work. Either the logic is wrong or I am not using the correct event???

I have tried every combination I could find on the internet and $300 worth of Access manuals but no luck. Any ideas?????

View 12 Replies View Related

Tables :: Changing Field Data Type But Keeping Data

Oct 23, 2013

I have a field in a table that is comprised of mostly numerical data but some records are text.

I want to convert this field to numerical only and make a new field to put the textual data in.

However converting the field will delete the textual data. What is the easiest way to convert the field but save the textual data AND append the textual data to the SAME record that they were in originally in the new field?

View 2 Replies View Related

Getting Data From More Then One Source

Jul 14, 2005

In my contacts datababse I have a main table where all the is stored for my contacts.

I have a form that I use to enter and display the information from, Because I have more the one contact at a given company I have created a seperate table that contains all of the contact details for each office.

What I would like to be able to do is when I select a office on my form Access will populate the the rest of the fields in this section with the relevant information.

How do you do this?

View 2 Replies View Related

Access Requery Of Underlying Form

Nov 17, 2011

This seems pretty simple but I would like to select a combo box and after the user selects the combo box (Which Is a City) I want to use the underlining query of the form to run because I am using the <>False Criteria for a command of;

IIf([Forms]![frm_Deals]![CheckCity]=True,[City] Is Not Null Or [City] Is Null,[City]=[Forms]![frm_Deals]![SelectCity].[Value])

I may have other combo boxs with other information so that is why I want to run the underlying query. I have used the After Update command of;

Me.RecordsetClone.FindFirst "[XXXX] = '" & Me!FindXXXX & "'"

But I want to requery the query under the form.

View 1 Replies View Related

Data Source Change

Nov 21, 2005

If the data source changes for an Access database, do I need to recreate all the tables, queries, and reports? I am having quite a time with this issue. Thanks for any assistance you can provide.

View 1 Replies View Related

Confirm Data Source

Jun 14, 2007

I am automating a mail merge with Access to Word. Does anyone know how to stop the Confirm Data Source dialog window from coming up and just except the default (orginal) data source? I have users that do not know they should just click the OK button, some are clicking NO and then I lose the connection because they dont know where the table link is. I dont know what else to do but tell them to always click the Yes button when confirming but not everone listens and then i have to do it all over again.:mad:

View 2 Replies View Related

Forms :: Populating Invoice From Underlying Table?

Jun 14, 2015

As simple as it sounds. I have set up a table with a list of items and the costs. I then created a form with a list comprising 10 combo boxes. I want to be able to select one record from the underlying table per combobox on the form.

I am able to do this but the records in the underlying table keeps switching to the primary key field as I go along using the combobox.

View 8 Replies View Related

Complicated Form Data Source

Mar 18, 2005

Well I find it complicated.

I have a table of people, each with an ID, and I have a table of events, each with an ID.

I want to design a form in such a way that when you look at each person it gives a row of event fields, one for each event, into which you can put a Number for the number of tickets that each person wants (each person will only want to go to a few events).

If you enter a number, I want the form to generate new record in a separate table (tickets) with three fields - the Person's Id, the Event ID and the number of tickets.

I only want one ticket record per person per event (so if the numer of tickets changes I want the form to amend the number, not create a new record.

So, I want the Form to show "page" for each person, with "fields" for each event, the info being stored in a separate table, which the form is able to cycle through, despite the fact that there will not be records for every person.

I am a bit flummoxed as to how to design it.

Can anyone give me any guidance, please.

View 4 Replies View Related

Data Source Field Is Read Only

Jun 13, 2006

Hi, I know this has to be simple, but when I test a Data Access Page on my local machine I get an error that says "data source field is read only". I've made these pages before and never had a problem with writing to the database using a DAP. The database is not read only. Any ideas?

Thanks...Doug

View 2 Replies View Related







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