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

Change Table design after data inputted

Status
Not open for further replies.

kkrev

Technical User
Oct 10, 2000
13
0
0
US
One the db is operational, is it possible to go back into the design of table and change from text to number if it's all numbers in the column?
Will I lose info as it warns me?
Once the number data is put in the cell on the form, I want it to automatically go that record if it exists.
It's indexed so it doesnt duplicate but I dont know if it is a duplicte until It shows a error and wont let me close
due to duplication.

Thanks
kk
 
Hi,

in the beforeupdate event of the control you can do something similar to this:

Set db = CurrentDb
str_sql = "SELECT * FROM mytable WHERE nr = " & Me!mycontrol & ";"
Set rcs_a = db.OpenRecordset(str_sql, dbOpenDynaset)
If Not rcs_a.EOF Then
int_nr = me!mycontrol
Me.Undo
DoCmd.FindRecord int_nr
End If
rcs_a.Close
Set rcs_a = Nothing

this should do.

the kid
 
What do I do with all the programimg that is already there?
Do I put the new command at the beginning or at the end of it?
It could be there because I indexed it to get no duplicates
Thanks for responding
kk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top