Null coding

R

Rpettis31

I have a form that will create a new form if one has not been created or go
to the existing form if one has been created, this code used to work now it
does not.

I am not sure what is wrong with this code
If IsNull(Me.txtRWNId) Then Call Create_RWForm Else Goto_RWForm

In all cases now a new form is created even with a value in the txt box?
 
M

Maurice

sometimes you have to double check. Try this one:

If IsNull(Me.txtRWNId) or me.txtRWNId="" Then Call Create_RWForm Else
Goto_RWForm


hth
 
R

Rpettis31

Apparently it actually is with this line which is the method I was calling
and it keeps adding a form.
DoCmd.OpenForm "frmRWForm", acNormal, , "[RWNumber]=" & Me.txtRWNId

I added the data mode edit and it pulls the item up. However I have this
exact code for another button to call a different form and there is not any
issues with it.

This code worked for three weeks so I am not sure why it decided not to work
now?
Any ideas?
 

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

Top