combo box problem

A

Alejandro

I have while controlled by a combobox (me.fabricx), but only work if i write the number directly , here is the working code:

Private Sub des1_AfterUpdate()
Do While Me.fab = 244
intera = Me.custo - Me.custo * Me.des1 / 100
Me.inter = intera
DoCmd.GoToRecord , , acNext
Loop
DoCmd.GoToRecord , , acFirst
End Sub


but i need the code like this :


Private Sub des1_AfterUpdate()
Do While Me.fab = me.fabricx
intera = Me.custo - Me.custo * Me.des1 / 100
Me.inter = intera
DoCmd.GoToRecord , , acNext
Loop
DoCmd.GoToRecord , , acFirst
End Sub


But when i write me.fab=me.fabricx the code dont work, where is the error ????


Thanks in advance
Alejandro Carnero
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

parameter in combobox 2
Printing many images from different records 0
Check box problems 1
On Error Problem 3
apostrophe in record 6
Keeps Saying DeBug 2
Concatenate string using loop 2
Synchronized Combo Boxes. 0

Top