Several years ago I wrote an Access/VBA app for a client.
Been working fine since. Was written in Access 2002, clients' IT upgraded to Access 2003, SP3.
Of the entire app, there is now a single malfunctioning ComboBox. The box simply lists the 1st/key column of a table for selection. Currently...
...only while the subject Form remains open. Close it and the changes are gone. Can't save design changes from Form View. Probably makes sense to *real* programmers. That doesn't fit my situation, so I'll workaround ....
I agree that the doc's are less than helpful in the Save Form...
First, thanks .... very much
Second, you said:
... just some of the fields, and it doesn't have to work after close/reopen (that's a bonus), but during subsequent adds.
Third,
No I don't need to return to the specific record. I just want to change some combo/list/text box default values on...
...This is a fairly complex form with tabs and relational subforms and lots of arithmetic code. To try to limit potential trouble, I disable the '* new record' function in the record navigator and handle adds as a home-rolled menu function, that opens the form(on record #1 of the pertinent...
Once I puzzled out the relationships between the report design phase, the base query and the Me.Filter, this did exactly what I needed.
Thanks muchly ....brad
If I don't need a recordset, that's fine.
I intend to DoCmd.OpenReport. What I don't know is how to get the data from the open form fields to the 'recordsource' of the report. When I try to design the report, I'm only permitted to use Tables or Queries as the recordsource.
I see what you...
My example left out 'set' as a typo.
I had not yet made the reference to DAO 3.6 library.
So,
Dim rsTemp as DAO.Recordset
Set rsTemp=Me.Recordsetclone
works, and I have my data universe in rsTemp
Now, How do I :
a. base a report on it? , or
b. assign/dump/link it to a table, on which I can...
...of form, report and recordset.)
.....thanks, brad
A failed experiment.....
When I try to equate/assign record sets, eg.
rstemp.open "Select * From tbl"
rstemp = Me.recordsetclone
I get type mismatch errors, which my 10 pound book assures me is due to DAO/ADO mismatches, (which I'm sorry...
Whoops, I tried the FAQs again with different key words, and found a suggestion.
Create a recordset from the subform linkfield criteria and count it.
I'll go try that.....
thanks again
Situation: Form with subform, linked parent/multiple child with referential integrity enforced.
Processing with pretty deep code. On occasions, the subform has no retrieved records(rare, but expected in one specific situation). Subsequent assigning data to field of non-retrieved record fails...
...When the form is based on a query that has a user parameter entry as a criterion for a field.
Select Foo from tblBar WHERE (((tblBar.Foo) Like "*" & [Enter search target ] & "*"))
Dcount() fails, and I expect it to, because the search target is not specified. (tho' the error messages seem...
I'm trying to reliably (of course) determine if a DoCmd.openform returns no records.
The forms are query based, some of the queries have embedded [enter parameter ?] criteria, and some are driven from form fields.
1. A method I discovered here in this forum
recommends using...
Wow, lots of great feedback and good ideas. I think I have a much clearer idea of how this works. I've had this confusion that an openform was like a call to an independent subroutine, yet I know that the code that follows the call executes, cause I manipulate the open form all the time...
1. I can't find acDialog documented anywhere, except that it's a 'windowmode'. I did find a whole bunch of gibberish by a guy in Canada, saying how different and complicated it was, and mere mortal programmers probably didn't use it right (lol).
2. On the other hand, I've done a bunch of...
You said:
I'd put in code in the on-click event that then goes back to the 'calling code' ....
Yes, Exactly what I want.
So what code do I put there?
In other languages, this is called a subroutine return. How do I do that here?
I don't even know how to search for it.
====
Yesterday...
I have a form with 2 controls.
A combo box that has a row source in a table, nothing fancy, just the only field, all records.
A continue button. The on-click event is set to basically no-op.
When I open the form programmatically, it opens, and doesn't wait for any events, it just returns...
I came searching for exactly the same topic and problem. Using dhookom's suggestion, I attached this code to the Report Header OnFormat event. (Note that I'm using a label rather than a text box, but the ideas's the same. Ignore the Select Case logic.
This worked fine.
Private Sub...
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.