Re: Return ID value of inserted record, and populate text box
- From: "gsnidow via AccessMonster.com" <u33475@uwe>
- Date: Wed, 12 Aug 2009 14:20:22 GMT
Ok, the problem is that I am trying to compare STUDENTS.stu_birthday, which
is a date field, to txtDOB, which is text. So, now my problem is, how to I
convert this line...
'"AND s.stu_birthday = '" & Me.txtDOB.Value & "';"
In TSQL I would want 'AND s.stu_birthday = CONVERT(SMALLDATETIME,me.txtDOB,
101)'
Can you tell me how to do this with VB? Thanks for the help.
gsnidow wrote:
Thanks for the quick reply. Well, now I am getting a different error, "Data
type mismatch in criteria expression", so I guess that is progress. Could
that be because the value of STUDENT_ID being returned is number, and
txtSTUDENT_ID is text?
See whether it makes a difference using[quoted text clipped - 5 lines]
Me.txtStudent_ID = (rsSTUDENT_ID("STUDENT_ID"))
Me.txtUser.Requery
--
Message posted via http://www.accessmonster.com
.
- Follow-Ups:
- Re: Return ID value of inserted record, and populate text box
- From: gsnidow via AccessMonster.com
- Re: Return ID value of inserted record, and populate text box
- References:
- Return ID value of inserted record, and populate text box
- From: gsnidow via AccessMonster.com
- Re: Return ID value of inserted record, and populate text box
- From: Douglas J. Steele
- Re: Return ID value of inserted record, and populate text box
- From: gsnidow via AccessMonster.com
- Return ID value of inserted record, and populate text box
- Prev by Date: Re: Option Group - Clear Yes/No
- Next by Date: Re: Load,Edit and save images in MS Access 2000
- Previous by thread: Re: Return ID value of inserted record, and populate text box
- Next by thread: Re: Return ID value of inserted record, and populate text box
- Index(es):
Relevant Pages
|