Hi I have a forrm (Orders) , with a subform (Order Details)
Depending on a selection of a list field it makes certain field visible in the subform.
If I go the next record and select the list field it updates fields in the subform ( Visible ( True or False )
But if I go back to the previousl record it doesnt update the fields that are relavent to the option picked in the List Filed ( Which I have set to after update ). It works fine if I re-select the option in the list field
How do I set it to update the subform field automatically as I scroll through records?
I tried OnCurrent property but I dont think this is the correct one.
Combo box on continuous form should have the control source listed as the field on the form that will be updated. The Row Source, however, is a query that includes 2 things: the field on the form that will be updated (this part will be nonvisible in your form) and the table/query of selections you want to show up in the combo box (visible). Then ensure the Bound column is set to 1 and the Column count is set to 2 with Column Widths as 0";1"
I am OK creating a SQL query to update a table in a second database from a look-up table in the second database, and I can create a query to update a table in the current database from a look-up table in the current database - simple.
However, I am trying to create an Update Query to update a table in a second database from a look-up table in the current database.
(and I want to avoid copying the look-up table to the second database.)
I am using and UPDATE Sql statement to update a firld in a form to a table. However, I get the message updating 140 records etc. How can I get the SQL/Macro to simply update teh record I am currently working on?
I'm sure this is in this forum someplace but I can't locate it. I have a form.... With a subform... I want the subform to be invisable until I click a command button to make it visable. Tried a macro..... but it must be wrong... opens subform in a new window.. doesn't make it visable where I want it...... :confused:
i'm getting this message when i try and change a record in a table via a recordset... but i am using CursorType = adLockOptimistic which i thought let you make changes to the table
here is my code so far
Dim rst As ADODB.Recordset Set rst = New ADODB.Recordset rst.CursorLocation = adUseServer rst.CursorType = adLockOptimistic rst.Open "TBL_TmpSubmission", CurrentProject.Connection
If rst.RecordCount > 0 Then Do While Not rst.EOF MsgBox rst!PropertyType, vbOKOnly, "debug" If DCount("[PropertyType]", "[TBL_PropertyType]", "PropertyType = '" & rst!PropertyType & "'") <> 1 Then rst!PropertyType = DLookup("[PropertyType]", "[TBL_PropertyType]", "IDPropertyType = " & rst!PropertyType) MsgBox "property changed", vbOKOnly, "debug" Else MsgBox "good property", vbOKOnly, "debug" End If rst.MoveNext Loop End If
rst.Close
am i using the wrong combination or cursor and lock type here? reading the help it seems i should be able to make changes to the table.
Well, same question as before..... property on form set to visable = false I do not see any property for a check box... checked to display subform... uncheck to be invisable.... Quick answer for that one??
I'm having difficulties creating a sql statement which updates data in another Access database from a current database.
I'm able to do an insert and delete statement just perfectly, but not an Update. :confused:
For example, here is a dummy sample (which does not work):
Update tbl_test1 IN '\C:Tempabc.mdb', tbl_test2 set tbl_test1.Name = tbl_test2.Name Where tbl_test1.ID = tbl_test2.ID
I tried a couple of variations, however, I keep getting an error. Also, I don't want to create a database link (due to the sheer complexity of my project, which I'll spare you the details..)
Does anyone know how to do this? I searched the forums and came up with zilch! =(.. Help??!
I am very new to Access and all that it entails but I have really learned a lot viewing everyones posts. I cannot seem to get my current problem solved. I am trying to have a combo box appear depending on a preivous combo box selection.
1st combo box is "ApplianceCombo" 2nd combo box is "SpeedCombo" Set to Visible = No
1st Combo Box has Dishwasher Vacuum Washing Machine etc
If they choose Washing Machine I would like my 2nd combo box to appear which they can then choose 1000 1100 1200 1300
Hope I have explained this well enough. Thank you in advance for any help Kim
How do you find the maximum of four fields in each record of a query. Say (for example) you have daily records of the rainfall across four cities, where the cities are the fields in the query. how do you write an extra calculated field to the query that shows the max. rainfall across the fields on a paticular day.
I am creating a database that tracks current projects for my team at work.
Some projects are only due once (e.g., mailed brochures due on 1/1/14) and some are due at scheduled intervals (e.g., status report due monthly, quarterly, etc.)
Ultimately, I'm hoping that my end result will allow us to click on a form and look at what everybody has due that day, in the next 7 days, and so forth.
What I really need is for when the form opens, it looks at todays date, then matches current user and then goes to that record for today, if no current user there, then will goto new record..
i know, sounds complicated, and probably is really easy, but my heads not with it today, as about to get drunk as its my 40th, and got people ringing and texting and still trying to get this done....
I've included a copy of this database, named Timecards..
A few years back I saw a program which helped with database changes. I want to change names of fields and tables, queries etc. in a rather complex database. Does anybody know where I can get this tool or program to run through the database and change it in all corners and crevices on a search and replace basis?
hello, i am super duper new... and am working on a school assignment for weeks! its due tomorrow but i cant get this one rule to work... please help if you can!! Basically I am trying to add a validation rule to a field refering to a different field in a different table. Both fields are Date/Time type I am new.. and not as advanced as some of you.... so maybe walk me through it?? i have spend many hours trying to figure it out~ thanks
Hello, I am completely new to Access, so thanks to anyone who does not think my questions are dumb :) Ok, say for example I have a table that has my income information and my tax rate and I want to compute the income tax I need to pay by simply modifying total income with tax rate, how should I do it? there does not seem to be a function like formular bar in Excel in Access.
Recently I have started working for one of the company where I have to deal with one of the access file. this file has lots of tables containing many fields.
My question is
How can I get all the tables name, their fields and attributes in Microsoft Word file. I have tried opening table > design view and copy text but it doesn't work. also tries coping table and paste in in word file but it takes ages
I have 2 combo boxes one called primary which has Primary, Secondary, Tertiary
I also i have combo box called "Is There another insurance" which has yes, no, none,
What i want to do is if user selects primary the combo box called is there another insurance becomes visiable however if user selects Secondary, or Tertiary from the primary combo box the combo box called Is There another insurance becomes invisable.
What I would like to do is create a list box that will only display the information from another form that is related to the current form.So I have a form call Equipment Catalog and that form is related to Equipment features 1 to M relationship and the Equipment Features is related to a Features form M to 1.
So what I want to do is display all the related equipment features in a listbox that is related to the current PK of that form.So if there is only one feature on one form the list box will only display that one item however is there is 6 features on another it will display all 6.I have been trying SQL and Queries but I still can't get it to work.
Public Function getTradeMarks(varProdName As Variant) As String Dim rs As DAO.Recordset Dim intRecords As Integer Dim strTradeMarks As String Dim strSql As String
'strSql = "Select distinct [trademark] from tblTrademarks where [productName] = " & varProdName strSql = "Select distinct [trademark] from tblTrademarks where [productName] = '" & varProdName & "'" Set rs = CurrentDb.OpenRecordset(strSql, dbOpenDynaset)
Do While Not rs.EOF intRecords = intRecords + 1 If rs.AbsolutePosition = 0 Then strTradeMarks = rs.Fields("trademark") Else strTradeMarks = strTradeMarks & ", " & rs.Fields("trademark") End If rs.MoveNext Loop If intRecords = 1 Then strTradeMarks = strTradeMarks & " is a registered trademark of company " & varProdName Else strTradeMarks = Left(strTradeMarks, InStrRev(strTradeMarks, ",") - 1) & " and" & Mid(strTradeMarks, InStrRev(strTradeMarks, ",") + 1) & " are registered trademarks of " & varProdName End If getTradeMarks = strTradeMarks End Function
productName TradeMarks 123 T1, T2, T3 and T6 are registered trademarks of 123 234 T1 and T4 are registered trademarks of 234 456 T7 is a registered trademark of company 456 789 T8 is a registered trademark of company 789
The above code works Excellent.
I am looking for some code like this , my situation is similar but it has another column
For example In reference to the same example above I have one more column
Dose anyone know how to adjust the above code to get the following output
productName TradeMarks 123 T1, T6 and T9 are registered trademarks of C1. T2 and T12 are registered trademarks of C5. T4 is registered trademark of C6.
234 T1 is registered trademark of C1. T4 is registered trademark of C2.
I would like to create a command button on my form that copies values from 5 fields in the current record into a new record leaving all the other fields blank except for the new record ID.
The fields that contain the data that I want copied into a new form are:
I am using Access 2010 - Version 14.0.61.29.5000 (32-bit)
I am building a custom Export Wizard to export data to Excel using the Report Wizard for the basic ideas.
All I am trying to do is have a [Back] button on a form to open another form and close the current form.
Private Sub cmdBack_Click() DoCmd.OpenForm "frm_ExportWizardPage2", , , , , , Nz(Me.OpenArgs) DoCmd.Close acForm, "frm_ExportWizardPage3" End Sub
The new form is opening but then the current form is not closing. All forms are the same size, shape and positioned centrally although this should not make any difference.
Could this be anything to do with which form has the focus when I open the new form?
I have a series of forms that become current in a certain order. For example a menu form comes up. This is followed by a search form where the user gives search parameters. Then appears the results list. If the user wants a detail form comes after that, etc. Now when the user closes the last form I want the form before that one to show up and when he closes that one the one before that and so on. That is I am going to use the close button to go back to the previous step. How can I do this.
I have three objects a Main_Table , ClientDataForm and a MapForm all three share a common ClientID number
From that Main_Table I have created a ClientDataForm form which I enter all Data
From ClientDataForm I wish to create a button on it which runs a Macro that Saves ClientDataForm Record and then populates another form named MapForm with whatever record is currently open in Form One whether a newly created one or previous record.
How would I write this code for that button? Also why I would write it that way?
When I have a form called "SiteForm" open and click a button "NewCalloutButton" I would like it to open up a form called "CalloutFormEntry"
I've done this using
Private Sub cmdOpenDetail_Click() DoCmd.OpenForm "CalloutFormEntry", , , "CalloutID = " & Me!CalloutID End Sub
However this brings up all the records linked to the calloutID
What I'm after is to open the CalloutFormEntry from the SiteForm in a dataentry kind of format but to carry over the current SiteID based on which site is open on the SiteForm. That way there's no user error logging callouts to incorrect sites.