本文介绍了取决于2个字段的顺序编号不会添加的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在这里添加连续的圈数。

如果添加了人的第一个racenumber,它会显示lapno = 1;


如果相同同一个人和racedate的人做第二圈然后lapno必须显示= 2


Mainform称为Racesetupf


子表格所在的子表单,被称为RaceTimingSF

表格和子表单通过RaceName字段链接。 Racename和Racedate都是独一无二的


字段:

Racedate =日期字段

racename = txtfield

Racenumber = txtfield

Racefinishtime = longdate


代码我在插入表单之前试过:

Me.LapNo = Nz (DMax(LapNo,RacetimingT,[RaceNumber] =''"& Me。[RaceNumber]&"''"),0)+ 1 ---用它做只有第一次套装


如果我在另一个日期举行另一场比赛,那么必须重新开始比赛,因为Racenumbers + lapno

请参阅随附的屏幕截图

对于Racenumber = 1在第一圈,lapno = 1

如果你再次输入Racenumber,那么lapno必须改为= 2等不同的racenumbers。这必须至少工作8圈

请帮助



I need to add sequential lap numbers here.
If person''s first racenumber is added, it shows lapno =1;

if same person in same Race and racedate do 2nd lap then lapno must show =2

Mainform is called Racesetupf

Subform where table is, is called RaceTimingSF
The Form and subform are linked via the RaceName field. The Racename and Racedate are both unique

Fields:
Racedate = date field
racename = txtfield
Racenumber = txtfield
Racefinishtime = longdate

code i tried in before insert of form:
Me.LapNo = Nz(DMax("LapNo", "RacetimingT", " [RaceNumber] = ''" & Me.[RaceNumber] & "''"), 0) + 1 --- do it with first lapno only

If i have another race on a different date, then process must start all over again for the Racenumbers + lapno
see attached screen capture pics
For Racenumber = 1 on the first lap the lapno = 1
if you enter Racenumber again, then lapno must change to = 2 etc for different racenumbers. This must work for at least 8 laps
pls help

推荐答案




这篇关于取决于2个字段的顺序编号不会添加的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 17:29