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...
Ok, the light dawned while I was sleeping, and your experiments verify it.
The snippet works fine 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...
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...
Simple need: to fill-in a form-based new record with data from the previously added record.
The FAQ's lead to this:
Private Function SetDefault()
Dim ctl As Control
Set ctl = Screen.ActiveControl
ctl.DefaultValue = """" & ctl.Value & """"
End Function
then bind the function to...
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...
I have a form. It's quite complex and has multiple selection criteria. The point being, when the form is open, its recordset constitutes the universe I would like to create a report from.
The only way I've been able to succeed in this:
1. Open the form hidden ...Display "WAIT"
2. Assign a...
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...
Because:
1. 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...
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...
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.