problem is in form5 when i add stock it didn't refresh...
just download my attach file "datagridprob.zip" and try to correct my code in "add_stock form" then if you got it right kindly post your code here...thanks...

Recommended Answers

All 3 Replies

BEFORE Form5.Show, put the following code -

Form5.Adodc1.Refresh
Datagrid1.Refresh
Form5.Show

Here's some fixes too.

On form5
on your Adodc1 control

1. Right Click
2. Click Build then on the First textbox where you enter your database path
3. replace the original path with inventory.mdb 4. Click Test COnnection button
5. Ok > Apply
6. RIght click on your Datagrid control then > click Retrieve Fields

And there you go, that message won't be disturbing you again.
Do the same on form 3 (Adodc2)

On form7 cmdAdd

At design time
Set cmbItemName property Style = 2 - Dropdown list
to disable typing on it

Replace your

If cmbItemName.Text = "Select an Item from the list" Then

to

If LenB(cmbItemName.Text) = 0 Then

At design time
Set txtQuantity property Enabled = True so that the Setfocus statement won't give you an error.

Replace your

ElseIf txtQuantity.Text = "0" Then

to

ElseIf LenB(txtQuantity.Text) = 0 Then

Here's an advice:

Practice naming your controls (with correct extensions e.g Command1 to cmdAdd or Text1 to txtName)
This is to make coding easier and avoid being confused

thank you so much...by the way tomorrow i should think about codes for my logic..this is my logic, when i click ok to add_stock form it will add to field(Current_Stock and to Total Stocks) the same goes to wdr_stock form, when i click ok to (Current Stock)will be deducted with the number input and number input will be add to (Total Withdrawals)

Tomorrow i will do the coding and if there's a problem I hope u can help.. I'll just post a new thread regarding with the problems....Again..Thanks...I'll mark this thread as solve and tomorrow I'll post a new thread regarding with my codes problem..Good Night Sir, I need some rest, I've been working on this system 18hours this day,I should probably take some rest....Thanks for helping...Hope you'll help me again in my future problems...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.