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

How do you update a field from a second element of a query

Status
Not open for further replies.

Modex

Programmer
Sep 15, 2002
155
0
0
GB
Hi all.

I have a couple of questions on this thread,Ive been trying to fathom out how to do them, but it just keeps eluding me.

Anyway First Question.

I have a Combo Box Field on a form that looks up a [Epsiode Name] which is based on a query that contains two fields which are (EPISODE) and (EPISODE NO).

When I select the episode it updates that field no problem, but what I would like it to do as well, is update the [Episode No] automatically as well. I'm just not sure how to get that second elemnt to update the [episode no] field.


Question Two

As a field gets focus, is there a way to look at the previous record and add 1 to it and then update the current record. i.e If the previous record had 17 in it then as the new record field gets focus, it would automatically update to 18.

many many thanks

ModeX
 
1) you can reference the portions of a combo box by using the 'column' property. but remember that the first column in the combo box is zero, the second column is 1, etc. so you can make a text box on the form, and put into it
Code:
=combo1.column(1)
substitute you combo box's name for 'combo1'.

2) are the numbers you are using specific to your project, or are they simply incrementing numbers, assigned to each record as a record is added? If so, how about making that field type = 'autonumber'? Will that work for you?

g
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top