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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not seeing new control source

Status
Not open for further replies.
Jan 20, 2005
180
US
I have updated a table and added a field to it.
I now need to update a form so that it will update the field that I have just added in the table.

Currently I have 3 tables that I am using.
The form edits only 1 table, of which is the one I altered. For the form to update the table/field I need to set the control source for a text field defined in the form. However, I am not able to use the table's field as a control source since it was not in the table to begin with. So I am now searching for a way to add this without redoing the whole form.
 
How are ya Lotharious . . . . .

[blue]Make sure the new field is included in the [purple]RecordSource[/purple] of the form.[/blue] For instance . . . if its a query, [blue]you'll need to pull the new field out into the field list[/blue]. On the form you can tell its right because [purple]you'll see it in the field list of the form . . . .[/purple]

Calvin.gif
See Ya! . . . . . .
 
Doing Much better now...
Thank you very much.
That give me the info to figure out what I needed to do.
 
Ok, next, how do I get a Sum() from the query as a source for data.

Im need to populate a feild with a sum of a column that matches the query criteria. Hope this makes sense.
 
Take a look at the DSum functio.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Great.. Learning alot here...
Im coming up with the wrong value with the DSum Function.
Ive determined this is from the Table not being updated.
Is there anyway in the macro to force the table to be updated with the current record that it is on so that the DSum function will return the proper value?
 
Lotharious . . . . .

In the [purple]AfterUpdate Event[/purple] of the [blue]TextBox[/blue] in the [blue]column of interest[/blue], copy/paste the following:
Code:
[blue]   DoCmd.RunCommand acCmdSaveRecord[/blue]

Calvin.gif
See Ya! . . . . . .
 
Most Awesome...
Didnt think of the run command functions..
The After update did not work since it didnt get updated until the end of the macro and the next command in the macro was the sum function. But the RunCommand function in the macro itself I found the lovely SaveRecord command and that worked beautifully. Thank you very much Ace and PHV for your help and time..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top