var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Get Data from Unbound form and populate on Data Entry Form
I hate the same ole "new to the Access world . . . " opening, so I will spare you.
I have what seems to be a simple task. I have a small Database that tracks building data.
I have a form that asks the user to define 2 entries first. These questions are on an Unbound Form. I would simply like to get that data and place it on the New Property form in the respective spots.
DB is attached.
Open frmGetPT&PU, select one item from each field.
Click command button, that opens the next form.
the two fields I would like to populate with your selections are:
Simple in my mind, but after 2 days of pounding on it - I got nothing and need your help - thanks in advance for your consideration and time.
If you want to stay with the macro, you'd use the SetValue action (may have to click on "Show all Actions" on the ribbon). In VBA, which is what I use, right after opening the second form:
Forms!frmNewProptxtPropType = Me.cboPropType
I appreciate your time sir - I have been dancing around this, well like I said, for a couple of days - UGH!!
I knew it had to be something simple . . .
So here is the resulting code, and yes, I converted the stumbling macros to VBA. - this is running on the "Continue" button
Private Sub cmdOpenNewProp_Click()
On Error GoTo cmdOpenNewProp_Click_Err
PropType = Me.cboPropType
PlanUse = Me.cboPlanUse
DoCmd.OpenForm "frmNewProp", acNormal, "", "", acAdd, acNormal
forms!frmNewProp!txtSaleRental = "SALE"
forms!frmNewProp!txtPropType = PropType
forms!frmNewProp!txtPlanUse = PlanUse
DoCmd.Close acForm, "frmGetPT&PUSale"
Just a couple weird returns to clear up, but I believe they are in the Query
Happy to help and welcome to the site by the way!