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

Simple Change in Database 1

Status
Not open for further replies.

briglass

Programmer
Dec 4, 2001
179
GB
I get an error when my Visual Basic project reaches this line:

dbNames![id] = idchange

it also doesn't like

dbNames![id] = val(idchange)

I must not be doing this right, any hints?
 
Hi!

We need a little more information. What is dbNames, [id] and idchange? It may be easiest to just post the code you have.

Jeff Bridgham
bridgham@purdue.edu
 
'(id is a field of the table Names)

set dbNames = db.OpenRecordset("Names", dbOpenDynaset)

inputchange = Val(InputBox("What number?", "Change", dbNames![id]))

dbNames![id] = inputchange

'or

dbNames![id] = Val(inputchange)


Make sense?
 
Hi!

Yes this makes sense, try this:

dbNames.Edit
dbNames![id] = inputchange
dbNames.Update

hth
Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top