I have a main table with a unique id, name tblMain this is where I get my unqID, I also made another table named tblClone using the SELECT Update. I have two forms Form1,Form2, 1 command button and textbox named txtTotal. My Form1 is used as a switchboard for my Form2.
in my Form2 I put my textbox and set Me.txtTotal= DCount("[unqID]","[tblClone]") and
in my Command1 I put my command1 button and set Me.Visible=Fals e to close my switchboard and
DoCmd.OpenForm "Form2", acNormal
my problem is, every time I click my command1 button to show Form2.My txtTotal shows 0 value. I don’t understand it because vba doesn’t show any error during runtime and when I switched to design view and manually open my Form2. this is the only time my Form2 shows the correct value counted.
How can I make my txtTotal to show my total value when I clicked my commnd1 button from Form1? Is my switchboard the problem? Please help
in my Form2 I put my textbox and set Me.txtTotal= DCount("[unqID]","[tblClone]") and
in my Command1 I put my command1 button and set Me.Visible=Fals e to close my switchboard and
DoCmd.OpenForm "Form2", acNormal
my problem is, every time I click my command1 button to show Form2.My txtTotal shows 0 value. I don’t understand it because vba doesn’t show any error during runtime and when I switched to design view and manually open my Form2. this is the only time my Form2 shows the correct value counted.
How can I make my txtTotal to show my total value when I clicked my commnd1 button from Form1? Is my switchboard the problem? Please help
Comment