How To Change The Contents Of A Querry Using A Form?
Aug 18, 2006
Hello,
I'm a new Access user and i couldn't figured out how to implement the following:
- I've got a form with buttons on it. These buttons refer to different querries which either displays or changes specific data on the predefined table.
- With a text box (or another thing) I want the user to enter a table name, so that the querries gain portability to work table-independent.
Briefly this is what i want;
-- User should enter a text
-- This text should be used to change the TABLENAME in each of the querry
But I don't know how :(
Is there anyone who has time to explain this implementation in detail??
I have a database that I imported as a comma deliminated csv file. To keep my original text comas intact I changed all the commas to semicolons before I created the csv file and imported the data. I now have a data base with semicolons in place of the original commas.
I am trying to use the update query function to change all the semicolons back to commas in one of the database fields called File_name
I have a data entry where a record in the File_name field looks like this for example
Chevrolet cavalier; red
and I want to change it so that it looks like
Chevrolet cavalier, red
I run an update query with the criteria set as Like "*;*"
and this finds all the records which have a semicolon in them
I have set the update field to "*,*"
but all this does is to change the record from
Chevrolet cavalier; red
to
*,*
Is the query update the way to go and what is the syntax that I should be using in the Update field just to change the semicolon to a comma and leave the other text intact?
I am developing a form whereby the user types a single character or a sequence of characters into textbox and a query WHERE clause is compiled upon each character being entered.
The query is the Row Source of a listbox which I requery upon each change in the text box contents.
In the Change event I cannot access the new contents of the textbox until focus moves to another control and then back to the textbox. This is not how I expect this event to work.
I have two combo boxes on the same form bound to a table. I want the contents of the next combo box to change based on the previous combo selection e.g
cboContinent cboCountry Africa Zambia Africa Congo Africa South africa Europe England Europe Holland
If I choose Africa in cboContinent, I want to see only Zambia, South Africa and Congo under cboCountry and if I choose Europe I want to see only England and Holland
In a form of my "cities-of-the-world" database I have amongst others the fields: "Latitude" & "Longitude" Now I'm looking for the command button code that runs a querry to find all neighbouring places i.e. [Latitude] would be 'Between (Latitude + 0.75) and (Latitude - 0.75)' ... longitude likewise. In other words: When the form displays the record for Berlin, on clicking the command button there should appear a list containing the cities: Bernau, Oranienburg, Potsdam ...
I have a form that I would like to embed some text that is queried from the internet. I'd like to have a part of this form display this "quote of the day" info in a textbox, and im not sure how to do it.
The link to access the quote is through javascript: <script language="JavaScript" src="http://www.quoteworld.org/quotes.js"></script>
I have 12 folders (User1 - User12) located in "c:users..." When I select a UserName from a combo box in a form e.g. User3 , a list of all files with extensions ".doc" in the respective directory (c:usersuser3*.doc) should render with a hyperlink to the file / s.
I have tried variouse "Select Case" and "FileSearch, FoundFiles" scripts, to no avail.
How can I get access to hide certain fields or controls on a form if a certain field has no data?
Allow me to explain further:
I have a form that displays data = frmPlantMain and a associated image = Image1 The image is stored outside of the db as a jpeg and the field in the record source table (Image1) contains a link to the image. For example: C:databasePicture1.jpg
There is also a hidden text box that contains the message "No Image available" = lbl_NoPix This would be displayed in place of the image if no image has been inserted.
I also have a seperate "insert new image" command button = cmdInsertPic
If the current record has a image then I want to have the controls Image1,lbl_NoPix & cmdInsertPic hidden. This seems fairly easy but it gets more complicated now.
If there is no image I would like these controls visable so that the user can add a new image. I would then need the record to be requiried or refreshed to reflect the fact that a new image has been added.
This is where I fall down - I do not know how to tell access to look at the field in the table (Image1) and if there is no linked or associated image then set the visable propertys of controls a,b & c on the form to true.
I hope I have explained my problem correctly and I thank you for your time in advance.
I seem to be having an issue with a split form I've been working on. I created this split form on Monday and it was working just fine but today, I have added a couple minor text boxes. Since then, I can view the form contents in Design View but when I switch to "Form View" or "Layout View", it's all gone minus the logo in the top left corner and the title for the split form.
I have a field on a form that is the results of a dlookup to a table.field. I want the value to be updated when I execute a button that is running a macro. How do I do this automatically, and not have to hit the refresh button?
I am trying loop through a datasheet so that I can copy the contents of one field into another form.
I have tried using the bellow code to do this on a button click event. However when i run it I get an error telling me that the object doesn't support this property or method. Im not quite sure what this means.
Dim rst As DAO.Recordset Set rst = Forms![Roll Out - Site Form]![Roll Out - Sign items pick list].RecordsetClone Do Until rst.EOF [Roll Out - Sign items added].Form![Code] = [Roll Out - Sign items pick list].[Form]![Item Category]
I have not done much work in later version of Access. Now I found if I change a design in one form and similar forms (names are different) which are linked to the same tables got changed as well without openning them up and making changes. Is this something new with Access 2003?
Could you please help me to make a query with the below conditions from the attached test.mdb file?
1. Enq Received Date 10 days before the search date AND/OR 2. Technical Sub Date 4 weeks in advance of the search date AND/OR 3. Potential Date 4 weeks in advance of the search date
The querry will display all the records which satisfies the above conditions.
I have a table, [temp_indicateur] which has fields [id,libelle_court,description,calcule,resitute,orig ine,seuil_min,seuil_max] [number,text,text,boolean,boolean,boolean,number,nu mber]
My querry is this: insert into temp_indicateur (id,libelle_court,description,origine) values (" & rs!id & ",'" & rs!libelle_court & "','" & rs!description & "'," & rs!origine & ")"
But it gives me an error: Too little parameters
The table has no primary keys and no foreign keys. rs!id is the value of an earlier querry which I am running. Independently, I get the values of rs correctly but I can't get them to execute in this querry.
THis is my sample table with two columns. Property A can have 3 values 1,2 and 3. I want TO SELECT 4 columns such as classname, CountOf1, CountOf2, CountOf3. I just want ClassA in one row and at the same time get the number of 1's, 2's and 3's for that classA in seperate columns in the same row. I appreciate your time. Please Let me know how to write this querry.
Hello, This may sound too common a question, but I really need help on it. Prior querries in the same do not seem to solve it.
I have two tables, table1 and table2 with the following fields table1 ( ACID, name, address, Salary, MStatus,Age) table2 ( ACID,salary, Age)
ACID is the common field in the two tables ( primary key in table1)
Required
I need to update table1 with the colums in table2 for all the similar ACID in in table1.
Basically, after teh update, table1 will have all the information it had before the update, but a few fields will have changed coz of teh new information coming from table2.
Please help with the code. I'm using access, and the table structures are all the same.
I have these three tables A, B, C and D. IN table A, SSN is the primary key. Tables B, C, and D have other columns, but the also have SSN as one of the columns. Also SSN is NOT required in other tables.
What I need to do is to be able to run an update querry that will update the value of the SSN in table A, and in any other table that will have that SSN.
I Have A Querry That Adds The Amount Of A Certain Light Bulbs I Have Order Since 2003. I Then Subtract The Amount Of That Light Bulb I Have On Hand Now...it Gives Me The Amount I Have Used Since 2003. Now I Want The Querry To Take That Number And Divide It By The Numberber Of Months Its Been When The Querry Was Open.
Example...i Open The Querry 10-23-06 It Tells Me The 60 Watt Bulb Has Been Ordered 900 Times Since 12-2003 I Have 300 In Stock On 10-23-06 I Have Used 600 Since 12-2003
The Querry Needs To Give Me This Answer You Use 17 60 Watt Bulbs A Month
hello all, i would very much like anyones help with this,, i'm hoping its not too much to ask,, the story is a sfollows,,, i have two tables both conatining the same fields,, table 1 has approx 1k entries, where table 2 has approx 400 entries,, the data in table 2 is the newer data. what i would like to do is run a querry that would enable me to 'post' the data from table2 into table1,, for example table 1 has activity jc111 at 10% where table2 has jc111 at 20%,, if i could simply run this querry that would generate a new table or just up-date table1 my life would be very much better,, i really appreciate anyones help - please remember that i'm quite new to this thank you very very much in advance best regards
I managed to get a query working so that i can search the PERSON table searched by surname
PARAMETERS [PSurname] Text ( 255 ); SELECT PERSON.PReference, PERSON.PName, PERSON.PSurname, PERSON.PTel, PERSON.PMail FROM PERSON WHERE (((PERSON.PSurname)=[PSurname]));
but i cant get it to work i wanted to search it by PReference
PARAMETERS [PReference] Text ( 255 ); SELECT PERSON.[PReference], PERSON.[PName], PERSON.[PSurname], PERSON.[PTel], PERSON.[PMail] FROM PERSON INNER JOIN RGA ON PERSON.PReference=RGA.PReference WHERE (((PERSON.PReference)=[PReference]));
I get a msg that The expression is typed incorectly or is to complex to be evaluated. For example a numeric expression my contain too many complecated elements. Try symplyfing the expression by assigning parts if the expression as variables.
AND THIS IS NO HELP FOR ME... francly
The same situation is with all the other tables- its possible (query- search) for everything apart for the primary keys.
I prepared a querry gathering data from all those tables. I managed to get it work with parameter like the one below with surname
PARAMETERS [PSurname] Text ( 255 ); SELECT COMPANY.*, RGA.*, PERSON.PName, PERSON.PSurname, COMPANY.CName, GOOD.GDescription FROM PERSON INNER JOIN (GOOD INNER JOIN (COMPANY INNER JOIN RGA ON COMPANY.CReference = RGA.CReference) ON GOOD.GUpc = RGA.GUpc) ON PERSON.PReference = RGA.PReference WHERE (((PERSON.PSurname)=[PSurname]));
but the same situation again, i cant get it to work if i want to get it for RGAReference, CReference, PReference,GUpc
I don't know what i am doing wrong? have I designed it all wrong or is it just a small thing...
Thank you for all your help
My problems started when I tried to run a querry that will return the GDescription (this tables store data about 3000 products)
I have created a search form made up of a number of different boxes. In my querry for the search I am using the following statement:
Like "*" & [Forms]![Search]![ExerciseName] & "*"
I a have a number of theses all saying similar things. At present I have to put something in each of the search boxes. Is there a way that I can leave a box blank and still search by other criteria. If I leave a box blank at present it returns no results.
Hello All This might be an easy problem but I am not quite sure how to go about solving it. Presently I have a querry that is linked to a form so that when a person selects a role from the drop down list and you click search it uses the elment selected in the drop down list to show the coreesponding users. My probelme now is that I want to be able to select two different roles and use this querry to give me the users corresponding to these 2 roles. I would really appreciate your help what I have tired to do is create a new combo box and named it role 1 (the first one was named role) and then in the query in the criteria i tired to put the following [Forms]![Users To Role Search Engine]![Role, Role1]but that give me nothing I am sure there is a flaw in my logic but I am not sure how to solve this. Thank you for your help