kingosticks
Programmer
i have the table
TblRound(
RoundID : Autonumber
RoundNo : integer
MatchID : string }
i need to get the RoundID when i insert a new record and assign it to the integer variable RoundID, i have been using the following (after inserting a new row) with no success:
QryMatch.SQL.clear;
QryMatch.Parameters.Clear;
QryMatch.SQL.Add('SELECT MAX(RoundID) FROM TblRound');
QryMatch.Open;
QryMatch.First;
RoundID:=QryMatch.FieldByName('TblRound.RoundID').Value;
QryMatch.close;
when i run this it gives me the error saying "QryMatch: Field 'TblRound.RoundID' not found". can someone please shed some light onto what im doing wrong. many thanks
TblRound(
RoundID : Autonumber
RoundNo : integer
MatchID : string }
i need to get the RoundID when i insert a new record and assign it to the integer variable RoundID, i have been using the following (after inserting a new row) with no success:
QryMatch.SQL.clear;
QryMatch.Parameters.Clear;
QryMatch.SQL.Add('SELECT MAX(RoundID) FROM TblRound');
QryMatch.Open;
QryMatch.First;
RoundID:=QryMatch.FieldByName('TblRound.RoundID').Value;
QryMatch.close;
when i run this it gives me the error saying "QryMatch: Field 'TblRound.RoundID' not found". can someone please shed some light onto what im doing wrong. many thanks