Form Load problem

B

Bob Vance

The problem is that I create my invoice/record from frmMain my main page but
to update my Invoice I have to do it from frmModifyClientinvoice, Is there a
way to code ot so if the first part fails it will move to the 2nd part?

recInvoice.Open "SELECT * FROM tblInvoice where InvoiceID=" &
Forms!frmMain!subfrmModifyInvoiceClient.Form!lstModify.value _
, CurrentProject.Connection, adOpenDynamic, adLockOptimistic
subShowInvoiceValues
subShowInvoiceDetailValues

recInvoice.Open "SELECT * FROM tblInvoice where InvoiceID=" &
Form_frmModifyInvoiceClient.lstModify.value _
, CurrentProject.Connection, adOpenDynamic, adLockOptimistic
subShowInvoiceValues
subShowInvoiceDetailValues


-------------------------------


If CurrentProject.AllForms("frmActiveHorses").IsLoaded = True Then
cbOwnerName.value = Form_frmActiveHorses.cboClient.value

If CurrentProject.AllForms("frmMain").IsLoaded = True Then
cbOwnerName.value = Form_frmMain.cboClient.value
 
D

De Jager

Bob Vance said:
The problem is that I create my invoice/record from frmMain my main page
but to update my Invoice I have to do it from frmModifyClientinvoice, Is
there a way to code ot so if the first part fails it will move to the 2nd
part?

recInvoice.Open "SELECT * FROM tblInvoice where InvoiceID=" &
Forms!frmMain!subfrmModifyInvoiceClient.Form!lstModify.value _
, CurrentProject.Connection, adOpenDynamic, adLockOptimistic
subShowInvoiceValues
subShowInvoiceDetailValues

recInvoice.Open "SELECT * FROM tblInvoice where InvoiceID=" &
Form_frmModifyInvoiceClient.lstModify.value _
, CurrentProject.Connection, adOpenDynamic, adLockOptimistic
subShowInvoiceValues
subShowInvoiceDetailValues


-------------------------------


If CurrentProject.AllForms("frmActiveHorses").IsLoaded = True Then
cbOwnerName.value = Form_frmActiveHorses.cboClient.value

If CurrentProject.AllForms("frmMain").IsLoaded = True Then
cbOwnerName.value = Form_frmMain.cboClient.value
 

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

Cant find subForm 5
Change Order on a Report! 2
Ok This one is Tuff 3
Adding a CC to email code! 7
Enter Date on Emailing 6
Emailing Question from my DB 2
Adding a Field to a Function 5
Sending Report via Email 3

Top