VB front end interface?

VBnetBeginner

New member
Joined
Apr 24, 2009
Messages
1
Programming Experience
Beginner
Need help in creating a VB.net front end interface that allows two numbers to be entered and then a button to launch a query. The query is all created and tested. I have an example in MS Access, but the part of the delete query will not run in access, since the table is a linked table on the SQL server. Here is the code that launches the query using Access.

DELETE FROM RMDB_Forecast;

INSERT INTO dbo.RMDB_Forecast ( PROJECTID, ItemNbr, TimeID, FORECAST, TMO_ADJ_FOR, Target_Inv, Item_Desc, TMO_ID, TAG, TimePeriod )

SELECT dbo.SSI_PRJ_1.PROJECTID, dbo.SSI_FOR_1.ItemNbr, dbo.TimePeriod.TimeID, dbo.SSI_FOR_1.FORECAST, dbo.SSI_FOR_1.EventID, dbo.SSI_FOR_1.EventID, dbo.imitmidx_sql.item_desc_1, dbo.imitmidx_sql.item_note_1, dbo.SSI_PRJ_1.TAG, dbo.TimePeriod.TimePeriod

FROM ((dbo.SSI_FOR_1 INNER JOIN dbo.SSI_PRJ_1 ON dbo.SSI_FOR_1.PROJECTID = dbo.SSI_PRJ_1.PROJECTID) INNER JOIN dbo.imitmidx_sql ON dbo.SSI_FOR_1.ItemNbr = dbo.imitmidx_sql.item_no) INNER JOIN dbo.TimePeriod ON dbo.SSI_FOR_1.TimeID = dbo.TimePeriod.TimeID

GROUP BY dbo.SSI_PRJ_1.PROJECTID, dbo.SSI_FOR_1.ItemNbr, dbo.TimePeriod.TimeID, dbo.SSI_FOR_1.FORECAST, dbo.SSI_FOR_1.EventID, dbo.SSI_FOR_1.EventID, dbo.imitmidx_sql.item_desc_1, dbo.imitmidx_sql.item_note_1, dbo.SSI_PRJ_1.TAG, dbo.TimePeriod.TimePeriod

HAVING (((dbo.SSI_PRJ_1.PROJECTID)='TextBox1' Or (dbo.SSI_PRJ_1.PROJECTID)='TextBox2'));

Depending on what numbers are entered in TextBox1 and 2 the table (RMDB_Forecast) populates different numbers in the forcast collumn.
I am very new to vb.net and was just looking for some help creating the code to populate the table. any help/suggestions would be greatly appreciated. I am also new to this forum so hopefully this threadf is posted in the correct location.
 

Latest posts

Back
Top