Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7436519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:15:09+00:00 2026-05-29T10:15:09+00:00

When I hit the submit button I want the entered data to appear in

  • 0

When I hit the submit button I want the entered data to appear in textboxes on groupForm, but this isn’t happening. I have to restart the form or hit the Refresh button for the data to appear.

enter image description here

UPDATE

I zoned in on the problem;

I have to pass arguments to the form so it knows which groups’ data to show, like this;

Dim frmReceiver As New form_addNewProfitObject
frmReceiver.setGroup(theMainGroupID, theGroupID)
frmReceiver.ShowDialog()

If I open the form like this, the data entered appears just fine without refreshing;

form_addNewProfitObject.Show()

But this way the form wouldn’t know what group to add data to. Is there a work around? I also tried to do frmReceiver.Show() instead of frmReceiver.ShowDialog() but that doesn’t make a difference.

I’m not entirely sure why the method I am using isn’t working.. maybe it’s because upon hitting ‘submit’ it calls groupForm.NewProfitObjectsItem(ByVal *snip*) and this doesn’t work if groupForm was created using new ?

END UPDATE

Here’s the code for hitting the ‘refresh’ button on Form number one (groupForm.vb).

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    populate(Form1.main.Groups(theMainGroupID).GroupObjects(theGroupID))
End Sub

And here’s the code for the Submit button, which (at the end) calls that exact same function, but from form_addNewProfitObject.vb.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    Try

        Dim groupID As Integer = theGroupID
        'New ProfitObject
        ReDim Preserve Form1.main.Groups(theMainGroupID).GroupObjects(theGroupID).ProfitObjects(Form1.main.Groups(theMainGroupID).GroupObjects(theGroupID).ProfitObjects.Length)
        Dim ProfitObjectID As Integer = Form1.main.Groups(theMainGroupID).GroupObjects(theGroupID).ProfitObjects.Length - 2
        Form1.main.Groups(theMainGroupID).GroupObjects(theGroupID).ProfitObjects(ProfitObjectID) = New ProfitObject
        'Set ProfitObject properties
        'Set ID
        Form1.main.Groups(theMainGroupID).GroupObjects(theGroupID).ProfitObjects(ProfitObjectID).id = ProfitObjectID
        'Set Name
        Form1.main.Groups(theMainGroupID).GroupObjects(theGroupID).ProfitObjects(ProfitObjectID).name = TextBox1.Text
        'Set Profit
        Form1.main.Groups(theMainGroupID).GroupObjects(theGroupID).ProfitObjects(ProfitObjectID).profit = TextBox2.Text
        'Set TypeID
        Form1.main.Groups(theMainGroupID).GroupObjects(theGroupID).ProfitObjects(ProfitObjectID).typeID = TextBox3.Text
        'Set Rarityd
        Form1.main.Groups(theMainGroupID).GroupObjects(theGroupID).ProfitObjects(ProfitObjectID).rarity = TextBox4.Text
        'populate(Form1.main.Groups(groupID))
        Dim textt As String = "ID" & ProfitObjectID.ToString
        groupForm.NewProfitObjectsItem(textt, Form1.main.Groups(theMainGroupID).GroupObjects(theGroupID).ProfitObjects(ProfitObjectID).name, Form1.main.Groups(theMainGroupID).GroupObjects(theGroupID).ProfitObjects(ProfitObjectID).profit, Form1.main.Groups(theMainGroupID).GroupObjects(theGroupID).ProfitObjects(ProfitObjectID).rarity, Form1.main.Groups(theMainGroupID).GroupObjects(theGroupID).ProfitObjects(ProfitObjectID).typeID)

        groupForm.populate(Form1.main.Groups(theMainGroupID).GroupObjects(theGroupID))

    Catch ex As Exception
        MsgBox(ex.Message)
    End Try

    groupForm.Refresh()
    Me.Close()
End Sub

I added groupForm.populate() at the end of the latter function for testing purposes, but I know that shouldn’t be necessary (“populate” just loops over all items in the ProfitObjects array and calls NewProfitObjectsItem for each one).

Anyway; when I submit the data from the second form, the groupForm doesn’t automatically show the new data. I either have to hit the refresh button or restart the form (it calls populate() on form load).

I simply want the new item to appear immediately after Submitting it. And it should, because that’s what groupForm.NewProfitObjectsItem() does. And to top it off I added groupForm.populate(). I’m assuming it’s not working because it’s called from an external form, or because the other form is open/has the focus.. Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:15:10+00:00Added an answer on May 29, 2026 at 10:15 am

    Figured out what was causing it. Since I was using New to create & show “groupForm“, “form_addNewProfitObject” wasn’t adding controls to the correct form when it called groupForm.NewProfitObjectsItem.

    I had to move the Public frmReceiver As New groupForm into the CGroupMain class so that form_addNewProfitObject can access it like this; Form1.main.Groups(theMainGroupID).frmReceiver.NewProfitObjectsItem

    The controls are now correctly added to the groupForm upon hitting submit.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I click on items in my listbox and then hit a submit button, but
I have a form that when the submit is hit i want a modal
I have UITextField of username and password, once the user hit the submit button
I have hit upon this problem about whether to use bignums in my language
I'm so close on this one, but I need a little help. I have
I hit this error while my web application was trying to execute a SELECT
If I hit a page which calls session_start() , how long would I have
I have hit a classic problem of needing to do a string replace on
I've hit a blank here and would appreciate a kick start. I have two
I have an asp.net web form with an html input and button at the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.