Zac123
asked on
access 2007 populate memo box with data from another table
hi all,
i thought i knew how to do this but it seems not... ive tried messing around with the default value to make this work but no cigar as yet.
i'd like the memo text area on my for to be pre-populated for the user when they open up a new form with data from another table. however the user is then free to make changes to that data and then click save which saves to the other table.
if the user decides to open the data they just saved then they should see the edited version of textarea data and not 'default' data
i hope of explained that ok.
as always, all help apprecited.
zac
i thought i knew how to do this but it seems not... ive tried messing around with the default value to make this work but no cigar as yet.
i'd like the memo text area on my for to be pre-populated for the user when they open up a new form with data from another table. however the user is then free to make changes to that data and then click save which saves to the other table.
if the user decides to open the data they just saved then they should see the edited version of textarea data and not 'default' data
i hope of explained that ok.
as always, all help apprecited.
zac
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
(You shouldn't rename the current event)
ASKER
ASKER
oh wait!!!
how many on current event can i have?
i already have onee:
Private Sub Form_Current()
If Me![Check11] = 1 Then
Me![QASubjectTo1].Visible = True
Me![Check14].Visible = True
Else
Me![QASubjectTo1].Visible = False
Me![Check14].Visible = False
Me![QASubjectTo2].Visible = False
Me![Check17].Visible = False
Me![QASubjectTo3].Visible = False
Me![Check20].Visible = False
Me![QASubjectTo4].Visible = False
Me![Check23].Visible = False
Me![QASubjectTo5].Visible = False
End If
End Sub
how many on current event can i have?
i already have onee:
Private Sub Form_Current()
If Me![Check11] = 1 Then
Me![QASubjectTo1].Visible = True
Me![Check14].Visible = True
Else
Me![QASubjectTo1].Visible = False
Me![Check14].Visible = False
Me![QASubjectTo2].Visible = False
Me![Check17].Visible = False
Me![QASubjectTo3].Visible = False
Me![Check20].Visible = False
Me![QASubjectTo4].Visible = False
Me![Check23].Visible = False
Me![QASubjectTo5].Visible = False
End If
End Sub
Okay - I think that means that you have a duplicate Current Event now (that confuses Access).
Remove the initial attempt
Remove the initial attempt
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
see post above
is there a way round this?
is there a way round this?
We're crossing posts...
You need to add the code I gave you to your existing Current Event code. Place it at the beginning.
You need to add the code I gave you to your existing Current Event code. Place it at the beginning.
ASKER
yey i think we're gettin there. it only seems to appear when i click on the new form button and not when the form is first opened. i guess i could just add the same code under the on load event?
ok, now to work on your second bit of code your gave me.
ok, now to work on your second bit of code your gave me.
I thought the idea was to ONLY do this for new records.
If you want to load this everytime the form opens, just take out the new record check.
In other words, reduce this:
To this:
(Keeping it in the Current Event)
If you want to load this everytime the form opens, just take out the new record check.
In other words, reduce this:
If Me.NewRecord = True Then
Me.QATerms = DLookup("QATermsDefault", "tblQA_Defaults")
End If
To this:
Me.QATerms = DLookup("QATermsDefault", "tblQA_Defaults")
(Keeping it in the Current Event)
ASKER
NOPE SORRY SCRAP THAT
i was getting my self mixed up, i had blank records saved in the table, i was just generally getting confused.
its all working thanks for your excellent help.
i was getting my self mixed up, i had blank records saved in the table, i was just generally getting confused.
its all working thanks for your excellent help.
Glad to help :-)
ASKER
Private Sub Form_frmNewQA_Current()
If Me.NewRecord = True Then
Me.QATerms = DLookup("QATermsDefault", "QA_Defaults")
End If
End Sub
the "QA_Defaults" bit is the name of the tble right?
nothing seems to happen. note how i added the name of the form in the private sub line (frmNewQA) is that correct?