With patience comes reward. Specific records on the subform had no related records, which caused the delete command to bomb. The default error description was turned off so it did not return a reason. This stopped the remainder of the code from processing.
Once I accounted for the...
PHV,
Actually, that was one of the first things I tried. Just for the heck of it, I tried it again with no luck. The focus will not budge from the subform. There is really nothing special about the form.
This is the darndest thing. It flat out will not work.
Here is my actual code:
Forms![frm_housing].Form![frm_FeatureS].SetFocus
DoCmd.RunCommand acCmdSelectAllRecords
DoCmd.RunCommand acCmdDeleteRecord
Me.Parent.SetFocus
Me.Parent!Facility.SetFocus
The subrecords are...
I have a delete button that selects all related records in a subform and deletes them. This works fine.
I then want to move back to the main form and delete the main record.
I have tried:
Forms![Main Form].[Field].setfocus
Me.Parent!Field.SetFocus
The commands are ignored. What is the...
Are you talking about referencing the Main document in Word that attaches to the data source?
If possible, I would like to allow my users to call upon the Merge Wizard from within Access in order to give them the option of creating a new document or attaching to an existing one.
Basically...
Hi Everyone,
I have a form that uses a button to run a query that creates table for use in a Word merged document. The query is triggered using VBA code. After the query is run, the code selects the resulting table and then starts the Mail Merge Wizard (Office Links: Merge it with MS Word)...
drchuck59,
Thanks. That's sort of what I thought. I was hoping there was another alternative. I don't like the forms to do to much calculations since large data sets can be slow. From what I have observed, it appears as if the strConv is only affecting the active record, so the additional...
I noticed that the same name appears for both the combobox and the field: it could be that the form cannot distinguish between the two.
rs.FindFirst "[CourseID] = '" & Me![CourseID] & "'"
Make sure you are referencing the names correctly such as:
rs.FindFirst "[CourseID] = '" &...
I placed it on the "On Load" event of the form. It is working fine.
I have two questions:
1. Is there any way of doing this from the table design?
2. Can a similar technique be used to convert the stored data to proper case; as in a query.
Yes, finally. I was about to call Microsoft on this. Thank you very much for you help.
I do have one question though. Your statement:
"the text in blue above must be the NAME of the SUBFORM CONTROL on you main form - NOT the name of the form that resides in the subform control"
I am not...
Sorry, IGPCS, it didn't appear to work.
I also tried modifying the stlinkcriteria (as I have many times) to read:
stLinkCriteria = "Forms!frm_housing_questionnaire!frm_housing_feature_list.Form![category]=" & "'" & Forms!frm_housing_questionnaire!frm_Housing_Feature_List.Form![Cat_Search] &...
Guys, I really appreciate your help. Unfortunately, it is still not working.
Here is my code now:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Forms!frm_housing!frm_housing_features.Form"
stLinkCriteria = "[category]=" & "'" & Me![Cat_Search] & "'"...
Alright, so let's try this.
Here are my form particulars:
Main form: frm_housing
subform: frm_housing_Features
tabcontrol: tbctl35
[Category] subform field to be searched
[Cat_Search] Combo box that filters subform records
So, to construct your statement, I would type...
stDocName...
Hi,
I am desparately trying to find some help with this. It seems as if it should be simple.
I have a main form that displays customers. It has a subform displaying related records. The subform has a combo box which is used to filter the subform records.
The combo box (named Cat_Search) is...
Each form has a [Facility ID] field in their underlying table. The subform is properly linked to the main form on this field.
I honestly do not think this is the problem. I believe it is in the "stlinkcriteria" statement.
I am sorry, but I don't understand what you are saying.
To be clear, I do not want to filter the main form. I want to filter the records on the subform. The subform records are the related records for the active main form record.
The combo box (searchbox-named Cat_Search) is tied simply to a value list that provides three values:
Common
Security
Other
The subform has a [Category] field that stores one of these values for each of its records.
When a user selects one of the values (above), the subform should filter to...
I really appreciate the info. The problem is that I have tried the "correct" syntax; as mentioned in the articles you referenced, but cannot get it to work.
The subform exists on a tab control. Does that matter?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.