Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pre-Load data into subform

Status
Not open for further replies.

cazellnu

Technical User
Aug 15, 2002
41
CA
Hi All:

I had create a form along with the subform to capture the respond of the survey. Because we are not certain that how many question will be ask in the future. I had create a table to store all the questions and would like to preload these question in one of the column within the subform. I had tried to used the following code but it kept giving me differents error during the test:

With Me.Survey_Dtl_subform
.Form![Question].SetFocus
.Form![Question] = "A"
RunCommand acCmdRecordsGoToNext

.Form![Question].SetFocus
.Form![Question] = "B"
End With

I'm currently doing it as a test but eventually I will the "A", "B", ... but revise the code using dao. Any suggestion will be very helpful.

AY
 
How are ya cazellnu . . .

Whats the initial state of the recordset when the form is open:
[ol][li]No records?[/li]
[li]Fixed amount of records?[/li]
[li]Random amount of records?[/li]
[li]You'll append the records you need?[/li][/ol]

Calvin.gif
See Ya! . . . . . .
 
Dear TheAceMan1

The initial state of the recorset of the subform had not record. What I would like to do is to append the record from another table.

Thanks for your help.
 
An append query ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
cazellnu . . .

Agree with [blue]PHV[/blue] if you just want to append all the questions. However if you want to be selective in what questions are appended you'll need to do the following:
[ol][li]Add a [blue]Yes/No[/blue] field to the table of questions. Your selections are made with this field.[/li]
[li]Make a form bound to the table (to avoid having to go directly into the table) for making your selections.[/li]
[li]Add a [blue]Command Button[/blue] that will run the append query.[/li][/ol]
[blue]Your Thoughts? . . .[/blue]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top